‘Tips & Tricks’ Posts

 

Generic .htaccess non-www Redirect to www

Read full article  | No Comments

Here you go. I found this handy. RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Read More

Change Schema of all Tables in MS SQL

Read full article  | No Comments

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’ “

Read More

Check if a Key / Value exists in an Array of Structures

Read full article  | No Comments

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.

Read More

End & Home Keys in OS X

Read full article  | No Comments

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. [...]

Read More

Split view one a single file in Sublime Text 2

Read full article  | No Comments

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 [...]

Read More