API authentication in Sinatra with Clearance or Authlogic
Writing an API with Clearance
Recently, I needed to write an API to work with an iPhone application. I used Clearance for authentication. Unfortunately, it doesn’t support HTTP Basic Authentication out of the box, which made it difficult to use in an API.
Jekyll Pagination Gotcha
If you’re using Jekyll and pagination (see Template data),
make sure you’re using index.html
and NOT index.markdown
or index.md
.
`git browse` alias
I recently wrote a git alias to open a repo in your web browser.
Managing TextMate bundles with git submodules
I’ve been using TextMate nearly every day for 2
years. Over that time I’ve customized it exactly to my liking with a bunch of
extra bundles, plugins, and theme tweaks. I’ve tried a few different things
to try to manage my ~/Library/Application Support/TextMate
directory.
Deploy with git
I found this git hook that lets you deploy a project with a git push rather than having to use a full deployment library such as Capistrano. I use this on a bunch of PHP projects that don’t need all the features Capistrano provides.
ActiveRecord Migrations - integer limit gotcha
I work on a few apps that deal with phone numbers. I usually store these
as bigint(11)
in MySQL. My migrations always seemed to ignore this.
CodeIgniter Database Library Extraction
I’ve used CodeIgniter in several PHP projects, and I love it (if I have to write PHP). I’m a big fan of the included Database Library.
Formatting MySQL Queries For Asterisk
If you’ve ever used the MySQL module with Asterisk, you’ve probably had loads of fun formatting queries.
gem install without sudo
It took me a while to find a clearly documented way to manage
gems without having to use sudo
. Just drop these lines into your
~/.zshrc
or ~/.bashrc
file.