Monthly Archives: October 2008

How to Unlock Samsung 225BW Auto Adjustment

If you get “auto adjustment locked” on your Samsung 225BW monitor, hold down your “MENU” button for 5 seconds and it will unlock.

Posted in Hardware | Leave a comment

How to Write to STDERR in PHP

Writing to standard error in PHP:    fwrite(STDERR, “hello error string\n”);  Useful for standalone PHP scripts.

Leave a comment

How to Remove All Blank Lines in VIM

Regular expression to remove empty lines: :%g/^$/d

Posted in Regular Expressions | Leave a comment

How to Test Disk IO Speed with a Large Temp File

Create a 1GB temp file fast: time dd if=/dev/zero of=FileOfZeros.txt bs=1024k count=1024 Useful for testing disk IO speed.

Posted in Linux | Leave a comment

Faster File Copy Using Tar and SSH

How to quickly copy a file or directory over SSH using tar: tar -cf – myfile | ssh target_host tar -xf – If you want to change the target directory, use this: tar -cf – myfile | ssh target_host “cd … Continue reading

Posted in Linux | 1 Comment