August 2010
3 posts
10 tags
Amazon S3 + Nightly Database Backups
Amazon S3 is a cost-effective, redundant, and straight-forward solution for off-site data backups. Using the highly recommended aws command line tool by Tim Kay and a simple shell script running nightly, creating an automatic remote database backup is easy. After installing aws, I created a shell script as shown below. #!/bin/bash export AWS_ACCESS_KEY_ID= # your aws access key id export...
Aug 25th
5 tags
Testing for Input Focus
Though part of the HTML5 Specification, the activeElement attribute is now supported by all major browsers and offers the ability to determine whether an element currently has the user’s focus very easily. Previously making the determination for which input element currently had focus was done using multiple event handlers applied to all input elements. (Note: The selector below does not...
Aug 22nd
7 tags
Caching Static Assets with Cache-Busting Support...
(Note: This technique can be applied anywhere. This article is specifically related to a Symfony 1.4 implementation) As recommended in the Google Page Speed best practices, static resources should be cached locally in the browser. This means setting a far-future expiration date on filetypes such as .css and .js content. This first step is achieved rather simply by adding something like below to...
Aug 18th