Sunday, 27 September 2015

Random rubbish

I received an email from 7dayshop today advertising an LED headlight with 43% off and a camera shoulder bag with 40% off. I'm interested in the headlight as I'll very likely need to do some walking in the dark / dim light when on holiday soon. I do already have an LED headlight, but if this one was quite a bit brighter (the ad made a point of how bright it was), then it could be worth getting. The light was advertised as being 160 lumens bright, the question was, what is the lumen rating of my current headlight?

I couldn't any info where the product image exactly matched my headlamp, but the nearest I found was this one, which gives the rating as 140 lumen. Assuming the DX and 7dayshop lumen ratings are both accurate, then there wouldn't be much point me spending more money for a slightly brighter headlamp with no zoom control.

The camera bag I'm also interested in. A shoulder bag makes it quite easy to switch lenses. On the other hand, it makes it more difficult getting onto small bus seats when you're also wearing a backpack. I do have a shoulder bag, but it's in pretty bad condition. I found some reviews of the 7dayshop bag, Amazon being the best resource. The reviews all seem to be positive.

However, there are plenty of other similar bags with lots of good reviews, e.g. Bestek BTDB01. That particular bag is £2 more than the 7dayshop bag (£26 vs £24), but sold as being waterproof. Of course, it may be that the 7dayshop bag is just as waterproof, but also includes a rain cover for heavier shower protection. I prefer the sizing of the Bestek bag too (not as tall but slightly longer). From the reviews on the Bestek bag, it seems like £26 is the standard selling price, rather than 7dayshop's 'special' price for their bag. So there's no 'urgency' in getting a bag. (Unless I want it in time for my holiday).

Monday, 7 September 2015

Stats checking

Well, despite what I said yesterday, today was actually that super fun monthly event known as website stats checking day. So I was mainly just doing that. Though in the evening I watched Prometheus with Billesden.

When checking my website error logs, I found three errors that looked like potential true errors. One was to do with an undefined index when posting to xml-rpc on a WP site. I don't use this myself, so it would have been a spam bot / hacker request. But still, there shouldn't be an undefined index. When I checked the particular site, the WP version was out of date. So I just updated WP, and I'll wait and see if the same error appears in the logs next month.

The next error was PHP Fatal error: Call to undefined function get_header() in /wp-content/themes/twentyten/404.php on line 10. According to this post: How to fix the “PHP Fatal error: Call to undefined function get_header()” error in WordPress, the error is when the file is called directly in the browser, since WP is not loaded when calling the theme file directly. That makes sense, and also means it's an error not worth fixing in my opinion. Only hackerbots are likely to be calling that file directly.

The final error was an upstream response is buffered to a temporary file (file name) while reading upstream. There's a good article here: Nginx FastCGI response buffer sizes. I've removed the logs from the web server and my dev environment, so I can't run the average / max request size commands they suggest in their article, so I'll have to do that next month. However, I'm fairly confident that I have the buffer size set to a sensible amount already, as the upstream response buffer error messages were all for /feed/, which is a much larger size (the last 10 posts in full I think) than any other page on the site.

Sunday, 6 September 2015

Buying a pair of underpants for £30

Today I was trying to buy stuff I'll need for my trip to see Mauser next month. I looked into washing my waterproof stuff, and found that quite a few people recommend soap flakes for washing waterproof clothes. Apparently standard detergent can mess up the waterproofing, so it doesn't work properly. So you need to use soap flakes instead, and there doesn't seem to be any benefit (based on people's reports) of using Nikwax Tech Wash over soap flakes.

Soap flakes (or the Dripak Liquid Soap Flakes mentioned in that thread) are quite a bit cheaper than Nikwax Tech Wash. Another thing that thread taught me is that while washing in soap / Nikwax Tech Wash won't do any harm to the waterproofing, you still need to use a proofer as well every so often to add water repelency back into a fabric's surface.

Thinking about washing my clothes while away, I thought maybe it might make sense to take a box of soap flakes with me. After all, some of my clothes are wool, and others waterproof, so it makes sense to be able to wash them 'properly' while away.

Then, thinking about it more, I wondered if you could just wash your clothes (or at least some of them) in the sink at the hotel using standard soap. And according to this thread: Is there any reason not to do laundry with bar soap? you can. In the thread are mentioned two general purpose soaps, which the posters say are good for washing yourself and your clothes - Aleppo soap and Marseilles soap.

I thought that if I could take a bar of soap instead of a can of shaving foam, that would save some space. I also hadn't thought previously of bringing soap to wash with, but that likely will be needed in at least one of the places where I'll be staying. So I looked into whether Aleppo and Marseilles are any good for shaving with. I found a few threads where people said they were very smooth and good for your skin, but didn't give a good lather. A few people seemed to like them, but most didn't due to the lack of lather.

The best thing then, seemed to buy some and try it out to see how it works. If it works well, then I can take it with me instead of the shaving gel, if not, then I'm out a few quid compared to a bar of standard soap. I found a seller on eBay selling Aleppo and a range of other soaps at a reasonable price. But they didn't give any weights or sizes on the page, so it's difficult to tell how big the bars are. So I'm waiting for them to get back to me.

I decided that even with a bar of all purpose soap, I'll still need some laundry soap flakes for when I need to do a larger laundry load (or if something gets quite dirty). Looking at the dimensions of a box of soap flakes, it seemed that the volume was much more than the liquid soap flakes for the same number of washes. (Even after taking a couple of inches off the box dimensions to allow for oversized packaging).

The liquid soap flakes were also cheaper than the boxed, so I decided to go for the liquid. I'll see what it's like when it arrives, but I may well decide to put some of it in an old coke bottle for taking with me. It depends how sturdy the bottle it comes in seems (on Amazon some people had left reviews saying their's arrived with a broken cap and a small amount leaked out).

With regard to the title of this post, I bought some stupidly expensive boxers for £25 + £5 P&P. Unfortunately that seems the cheapest this particular 'model' is available in the UK. According to the reviews they are extremely comfy, breathable, and you can wash them in the sink before you go to bed and they'll be dry in the morning.

Ideally then, you'd have a couple of pairs, and you can just keep swapping between them every day. I can't afford to spend that kind of money for two pairs, and I'm not going to risk taking only one pair and trying to wash them overnight every day. But hopefully it should mean the need to take less underwear, and free up some more space and weight in my bag.

When I'd got my shopping done (actually I still have quite a few more things left I need to buy, but they need to wait), I had a look at buying a korail pass. I was thinking of a 7 day pass, but when I was trying to decide the dates, I realised that doesn't leave me many days of 'local' exploration. (No point having a 7 day rail pass and not using it). The 7 day pass, however, costs about 1 more day than the 5 day pass. So I can't really decide which one to go for, and what dates to go for.

I think I'm going to have to try and plan my trip a bit more so I have ideas on what / where I'm going to go each day. Then I can find out how much train / bus tickets would be without the pass, and how long / what dates it should be (and even if it's worth getting one at all). And I'll also need to do the same for my Japan rail pass.

Thursday, 3 September 2015

Stan Dingup

This morning I was cutting out pog images in Photoshop. Then for about half an hour before lunch, and most of the rest of the afternoon, I was cutting up plums. We now have no room left in freezer, and there's still lots of plums left on the tree. We have two 2 litre ice creams tubs, two other tubs, and one small (0.5 litre I guess) tub filled with plums in the freezer now. (I was stood at the sink while cutting the plums up, hence the title of this post).

Cutting them up wasn't that quick as the stones didn't come away from the flesh and had to be cut out. I also cut out red bits that were presumably where a little wasp grub had been. Almost every plum had at least one of these, usually just below the stone, though some above the stone. Others had multiple red bits, and some were all dirty inside (presumably a different grub that eats and defecates inside the plum much more).

In the evening I watched The Incredible Hulk with Billy. Yesterday we watched Hulk, on HD-DVD as we don't have the green-ray version :(.

Wednesday, 2 September 2015

Why do eBay have an EPN feed, which is almost useless as it doesn't support CORS?!

I spent most of this morning trying to convert an eBay RSS URL generation function from PHP to JS. When I'd done, I discovered that making an AJAX request for the URL doesn't work, as eBay haven't implemented a Access-Control-Allow-Origin header to allow CORS. So all my work was wasted.

I probably should have checked that first. (Actually I think I may have tried this quite some time ago and discovered the same thing). This leaves me with not many options (which I probably discovered last time I looked at this):

Proxy requests through my own server
The js script is meant to be something that others can easily use to add ebay listings to their own site. Requiring them to configure their server to proxy requests makes it more difficult to use, not to mention slower and a drain on your server.
Get the data using PHP
This makes the script easier to use than requiring server configuration, but still not as simple as a js only solution. It requires more server resources than a simple proxy. It is also against the main reason I am writing this script - the idea is keep eBay listings on my site up to date while the pages are cached on the server. I can cache the eBay results, and then clear them every 10 minutes. But then why not instead just stick with my current solution, but ensure that pages containing eBay listings are purged from the cache every 10 minutes?
Insert the eBay Custom Banner js into a hidden div, then parse the generated HTML
This would present a js only solution (well, of course eBay's servers have to do some processing). However, it is extremely messy / hacky.
Use the eBay Developer API and JSONP
This requires that anyone wanting to use the script on their site signs up to the eBay Developers program. It allows for only 5000 requests per day.
Use a public proxy service that supports CORS
This means you're reliant on a third party service, that if hacked, could present you with malicious data. It could be unreliable or go offline forever. Speed could be an issue. Still, at the moment this seems like it may be the best solution. Or maybe allowing specifying your own proxy, but using a third party one as the default.

Tuesday, 1 September 2015

Moving a site with no movement

This morning I was testing switching one of my sites over from Apache to Nginx. After changing the 'app' handling the site in my webhost, I tested the site, but there was no style applied. I checked the page source, and when I clicked on the CSS file, got a 404.

I checked the CSS file existed, and it did. I checked the Server logs, and there was nothing in the error log for the site. In the access log it didn't mention the request for the CSS file at all! I tried requesting the CSS file again, and this time it loaded.

I can't understand how that could happen at all. The CSS file was on the same domain / subdomain as the site. It's as if the front-end web server had passed most of the requests to my nginx back end, but for the first two requests to the CSS file decided to just generate a 404. (Since the requests for the CSS file didn't seem to be hitting my nginx at all). It wasn't a cached 404 as I haven't accessed this site for ages, it wouldn't have been 404 anyway, and I cleared my cache yesterday. Just seems plain weird to me.