Skip to content

Category Archives: Programming

Rails application failed to start properly

A bad deployment was preventing my rails server from booting up. production.log had nothing. Apache logs (~/logs//https/error.log) was empty. Stumped, I came across this article on FCGI from dreamhost: https://help.dreamhost.com/hc/en-us/articles/217298967-FastCGI-overview The tldr is that you can run `perl public/dispatch.fcgi` to get an error trace on what went wrong!

Easy Rails deployment with rsync

Starting a new Rails app? I find one of the most annoying thing with writing code is the initial deployment. I just want to get my little app online! The fastest way to deploy Rails (or any) code to production is probably¬†rsync. rsync¬†is actually a tool used to keep files synchronized, by copying/deleting the files […]

HTML 5 Local Storage with Expiration

Not sure why expiration isn’t built into the HTML5 specs for LocalStorage, but I put together this little snippet today. It uses Modernizr (http://www.modernizr.com/) to check for LocalStorage support. AZHU.storage = { save : function(key, jsonData, expirationMin){ if (!Modernizr.localstorage){return false;} var expirationMS = expirationMin * 60 * 1000; var record = {value: JSON.stringify(jsonData), timestamp: new […]