November 23, 2008

Explode into associative array

Filed under: How To,Mac OS X,PHP,Programming — James @ 6:32 pm

Simple function to explode a string into an associative array. Works in the same way as the normal explode but takes an extra argument which is an array of keys to use for the returned associative array.

(more…)

November 16, 2008

List files/folders ordered by size

Filed under: Bash,How To,Linux — James @ 11:13 am
du -s * | sort -n

November 11, 2008

Bash script to retry failed command

Filed under: Bash,Programming — James @ 2:09 pm

This was originally developed to retry an rsync command if a network error happened. It’s a mishmash of code found from around the net, and could probably be tidier but it gets the job done.

(more…)

November 9, 2008

Keychain Nightmare

Filed under: Mac OS X — James @ 1:28 am

On Mac OS X 10.5.1 (Leopard) they keychain is great! A central place to store all passwords…

When browsing in Safari, the keychain remembers passwords and pre fills the username and password fields next time you are asked for them, making remembering passwords and logging in to sites easy.

There are two type of passwords the Keycahin can remember for Safari; web form passwords (appear as a form inside a web page) and internet password (apper as the standard server authentication popup window).

This works great until a site that requires both.

(more…)