Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Flushing routing tables on Mac OS X

# cf. http://ola-bini.blogspot.com/2008/05/faulty-routes-on-macos-x.html
/usr/bin/sudo /sbin/route flush

Strip inline table and image properties

I wrote this while cleaning up some code generated by Macromedia Contribute. It put a ton of properties into images and tables

\s*(?:width="\d*")\s*(?:height="\d*")\s*(?:hspace="\d*")?\s*(?:vspace="\d*")?\s*(?:valign="\w*")?\s*(?:align="\w*")?\s*(?:align="\w*")?\s*(?:border="\d*")?

Retrieve MSSQL table information

Retrieve tons of information (length, data type, name, etc.) of columns for a table. Works in (T|MS)SQL (all I've tested it in).

SELECT * FROM information_schema.columns WHERE table_name = 'Customers'