‘Tips & Tricks’ Posts
Generic .htaccess non-www Redirect to www
Here you go. I found this handy. RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Change Schema of all Tables in MS SQL
Ran across this little gem when needing to change the schema of all tables in a given database. Obviously you’ll exchange “new_schema” with the schema of your choosing. From Ruslan Trifonov’s blog. exec sp_MSforeachtable “ALTER SCHEMA new_schema TRANSFER ? PRINT ‘? modified’ “
Check if a Key / Value exists in an Array of Structures
Needed a quick way to check if a key / value pair existed in an array of structures in Coldfusion. Came up with this little number.
End & Home Keys in OS X
I’ve recently moved from Windows 7 to OS X. I’m keeping my PC keyboard though and one of the most disturbing differences I’ve found between the two OSes is the lack of support for the Home and End keys. So here’s the fix: Create the following file, if the directories don’t exist on your system, create them. [...]
Split view one a single file in Sublime Text 2
There are some times when I’d like to view different parts of the same file while editing. This can be accomplished by setting up a multi-pane layout using View > Layout. Then when a file opened in a tab do File > New View Into File. This will create a second tabbed view of the [...]
