Misc

Getting Facebook FB.Event.subscribe edge.create & edge.remove to work with AJAX

This is a quick reminder to myself so I don't forget in future. I've got a Facebook Like button which I'm reloading using AJAX. Using FB.XFBML.parse(); is required to render XFBML markup on the fly but for some reason both the FB.Event.subscribe('edge.create') and FB.Event.subscribe('edge.remove') were not working after any AJAX event.

A very good reason NOT to use CloudFlare

Is CloudFlare great? Probably! Should I put up with messages like this when trying to view my site? Definitely not!!

Validate a date in DD/MM/YYYY format in PHP

I'm British! I like being British, the problem is that a lot of dates are formated MM/DD/YYYY. I spend a lot of time using DD/MM/YYYY format because that's what is expected for British sites. However, what if I want to validate a date in this format? Well it turns out it's pretty easy, below is a function I created to return TRUE if the date is in the valid DD/MM/YYYY format:

Get a thumbnail for a Vimeo video using the video ID

Getting the thumbnail image for a Vimeo video is very easy. Just use the following link, replacing the <video-id> with the id of the video.

Small image;

Get a thumbnail for a Youtube video using the video ID

Getting the thumbnail image for a YouTube video is very easy. Just use the following link, replacing the <video-id> with the id of the video.

Large image:

http://img.youtube.com/vi/<video-id>/0.jpg

Thumb image:

http://img.youtube.com/vi/<video-id>/1.jpg

Thumb image (different position):

Asthenopia - Eye Strain - from working all the time [solved]

I've been suffering from eye strain for over a year now, I just can't seem to shake it. There are many articles on the internet that include various solutions about what one should do in the event of developing eye strain, this isn't one of them, rather I'm going to just list all the ones I've tried. In my case, the best advise is to simply take time off and let my eyes recover, but everything I like doing involves sitting in front of a monitor.