Tag Archives: dev

monit

Monit for linux is a great way to make sure Apache is running. I set it up with the help of this fantastic tutorial. My steps after the break.


NSDateFormatter format specifiers

Ever wanted the list of format specifiers? As per the docs, it is here. Anything in single quotes is put through as-is.


Android Market Resources

Confused about what each of the images do and how they’re cropped? Look no further than this awesome test app! Market link here. Some high quality phone image marketing resources. I like this one.


Posting to Rails with AJAX

Don’t forget your csrf token! How to do it in Javascript. The token itself can be retrieved in Rails with: session[:_csrf_token]


When symbolicatecrash Fails (and it often does)

This problem has plagued me for almost three years now. It seems sometimes symbolicatecrash works, sometimes it doesn’t. I have all my dSYM files (I even use a build script that archives them all automatically), and spotlight can find them from the UDID, but to no avail. The solution is atos. I copied the dSYM   …Continue Reading


Oh My God They Killed parentViewController

Pre iOS 5, ‘parentViewController’ would return the view-stack’s parent view controller, or the controller which presented that controller when called on a modal view controller. This was the intended, documented functionality of the method, not some mistake. iOS 5 changes this by splitting out the latter functionality to ‘presentingViewController’. Unfortunately, rather than creating 2 new   …Continue Reading


json-framework (now SBJSON) is EVIL

I just had an unforgivable bug due to the json-framework JSON library. It was a regression, as it previously worked well a year ago. When I updated the library back in June, there was a massive flaw: all NSNumbers in NSDictionaries converted to JSON (a pretty common occurance) are limited to 6 significant digits. so   …Continue Reading


Git

Here are some things that I find useful in git. Basically this is my scratch pad of commands I need. Awesome Cheat Sheet Replacing one branch with another. To set master to be equal to ‘tweaks’ git checkout tweaks git merge -s ours master git checkout master git merge tweaks Merging Stop your local file   …Continue Reading


Rescuing HTTPClient Exceptions

I have a need in a rails app to rescue just exceptions raised due to fairly common situations in downloading data from URLs. Catching all exceptions is bad, as exceptions in my code are treated the same as connection errors, and not passed to my standard exception handling (HTTP 500, plus email to me). From   …Continue Reading