Archive for October, 2011

Set date.timezone in PHP without using php.ini

Problem: I needed to set default timezone for a site to get Zen Cart installed. The usual way would be to call date_default_timezone_set from a globally included script, or to use the date.timezone option in a php.ini file. The problem is that I don’t have access to the php.ini file and there is no script that [...]

Add ‘Related Products’ to the Product Template in the Shopp WordPress Plugin

Problem: Today I needed to add some code to a Shopp (ver 1.1.9) product.php template so that related products (that have same ‘Tag’) would show up at the bottom. The ‘Related Products‘ template tag was not behaving as I expected it to.. i.e. it was stopping the product page rendering anything at all. Fix: After chatting to some [...]

Type a degrees symbol “°” on an iPhone

Fix: You don’t need to enable Japanese input languages or anything like that, just press and hold the zero ’0′ key and a ° symbol will pop up.

Flush DNS Cache on OS X (10.5+)

Open Terminal type “sudo dscacheutil -flushcache” (without double quotes) press Return, you’re done.

Skoda Fabia VRS, temperature beep, expansion tank replacement

Problem: My Fabia’s temperature indicator light started flashing and beeping at me a few minutes after the engine was started, each time I used the car. The coolant level was fine, and the car seemed to get up to temperature quickly and stay there, never overheating. A quick search of the Briskoda forum revealed that this is a [...]

Replace nearside headlamp on Fabia vRS Mk1 without removing battery!

Problem: According to many websites and a few mechanics, replacing the nearside headlamp on a Mk1 Fabia vRS involves removing the battery and battery box. This is because the clear plastic light-cluster cover almost touches the plastic battery box. Thankfully this is not true, as I’ve just found out… you don’t even need very small hands [...]

Launch Google Chrome Incognito from the terminal or a shortcut in OSX

Problem: Ok not really a problem, but I want to be able to launch Google Chrome straight to Incognito mode from a shortcut. This is useful when logging into multiple bank accounts, Google Apps accounts, or testing session based websites. etc etc etc. Fix: Thankfully the Google Chrome.app can be launched with the –incognito switch [...]

Reboot Mac OS 10.* to BOOTCAMP from a desktop icon

Problem: I want a quick way to restart my macbook and boot to the Bootcamp partition with one or two clicks, for the next boot only. The two existing ways are: Restart OS X then hold the option key after the startup sound to bring up the boot options. This can be a pain if [...]