projects | github | twitter | rss | contact
July 2017

Pushing DNS into the Cloud

posted to writings on jul 10th, 2017 with tags nerd, pushover, and rails, last updated on jul 7th, 2017

For the majority of the past five years, Pushover has run on one physical OpenBSD server. It does have a hot spare hosted with another company in another part of the country, but usually everything has been served from just one machine at a time. Its MariaDB database is replicated in a master-master configuration over a secure tunnel between the servers so that either node can become active at any time.

Continue reading 2,310 words...

February 2009

static files with apache 2 + mod_proxy + mod_rewrite + mongrel + rails

posted to writings on feb 22nd, 2009 with tags apache, nerd, openbsd, rails, and ruby

corduroy does everything over ssl and because of that, it was noticeably slow on my openbsd laptop with firefox 3. using tamper data, i was able to observe that firefox was not caching any of the stylesheets or javascript files, so on every page load it would have to re-fetch these few files (one of them being prototype at a hefty 28kb post-gzip). that ultimately seemed to be a quirk in firefox on openbsd since the same setup with the same version of firefox on my mac was caching them fine and safari was as well.

with the help of rails' stylesheet_link_tag et al. appending urls with "?1214348293", i was able to use apache's ExpiresActive to force very long expiration times on these static assets:

Continue reading 626 words...

December 2008

god god

posted to writings on dec 7th, 2008 with tags nerd, openbsd, rails, and ruby

i'm using god on openbsd (kqueue) to monitor a dozen mongrel processes for various rails sites on one of my servers. i started using it just to have a simple way of restarting each collection of processes when i need to load new code or just start them when the machine boots up. eventually, i added cpu and memory checks to kill processes that go stray for too long, which doesn't happen that often.

however, now the task that constantly uses too much memory and cpu is... the very task that is supposed to be watching for tasks using too much memory and cpu.

Continue reading 198 words...

May 2008

stop the world, i want to get off

posted to writings on may 7th, 2008 with tags activerecord, FUCKFUCKFUCK, rails, and ruby

activerecord, your default and static :force => true setting has fucked me over for the last time.

i don't understand why anyone would make a default option eat all of your database tables.

Continue reading 91 words...

April 2008

full tilt boogie

posted to writings on apr 9th, 2008 with tags activerecord, corduroy, quickbooks, rails, ruby, superblock, and work

"we" have been working pretty hard lately on corduroy, a web-based billing system for small businesses. the live demo site is available showing off its features and functionality and the signup system will be ready shortly to start taking subscriptions.

i started writing corduroy years ago out of a personal need for a billing system for superblock. i tried quickbooks and hated it; all i wanted was a simple system for making professional-looking invoices and keeping tabs on my accounts. so, i quickly ditched quickbooks and started writing a web-based system in ruby on rails which i have been using ever since.

Continue reading 399 words...