Use VirtualDocumentRoot for htaccess local development in MAMP

Want each of your local development sites to have their own root and be accessible via the browser with whatever name you choose? Okay. Install MAMP according to this tutorial. Note that we’ll want to set Apache and MySQL ports to their defaults (80 and 3306, respectively) – as mentioned in the tutorial. Now! Much … Continued

Atomic Web Design

Used one of this fellows responsive css layouts and found my way to a very insightful preview of his upcoming book, Atomic Web Design.

Text Alert for Website Downtime

I’m going to set up my MacBook (via command line) to send me an email and text message when a website is down. I’ll be using gmail for SMTP so first let’s configure postfix: Configure Postfix for Gmail SMTP Edit file /etc/postfix/main.cf 1 sudo vim /etc/postfix/main.cf and add in the following below the commented out … Continued

WTForm File Validation in Python

The tricky thing about validating a file with WTForms, at least within Tornado, is that the file field doesn’t get sent to the validator, or more accurately, isn’t in the field object that does. I had a validator for an MP3 file upload that seemed to work for a while, then it just stopped working. … Continued

HTML Tidy with Text Wrangler

Finally getting around to automating HTML Tidy and found a useful blog post that helped. Move to folder: ~/Library/Application Support/TextWrangler/Text Filters/ Using your favorite text editor create a file called HTML Tidy.sh containing the script: #!/bin/sh # run “tidy” on the file given as 1st (and only) parameter. # /usr/bin/tidy -utf8 -asxhtml -indent -wrap 100 … Continued

Restoring OSX Library Files from Time Capsule

Just spent some time yak shaving when my powerbook stopped booting beyoond a spinning wheel of death. Finally ended up doing a clean install of Mavericks from a boot disc. A few years of installing software with various untested combinations of package managers like fink, macports and homebrew may have mucked up the OS a … Continued

Term Frequency – Inverse Document Frequency

Archiving and Retrieval is such an important area in this age of industry. Being introduced to RDF, Semantic Web and distance-metrics, I’m just beginning to scratch the surface. PyImageSearch mentioned tf–idf, short for term frequency–inverse document frequency, is a numerical statistic that is intended to reflect how important a word is to a document in … Continued