June 2008
3 posts
Jun 1st
Jun 1st
Jun 1st
April 2008
8 posts
Merb plugins (gems): merbful_auth: works, but terrible, terrible code. Do not use. paperclip: Doesn’t work.
Apr 24th
If ssh agent forwarding doesn’t work in capistrano, update your net-ssh gem.
Apr 21st
If ssh agent forwarding doesn’t work in capistrano, update your net-ssh gem.
Apr 21st
Given(“I am an activated, logged in user”) do Given(“I am a user”) Given(“I am activated”) Given(“I am logged in”) end
Apr 17th
c[:session_store] = ‘memory’ if Merb.environment == “test”
Apr 16th
Foo.class_eval do def bar puts “reopened class and replaced instance method” end end
Apr 16th
Mocha can mock an instance method on all instances of a class. RSpec can’t.
Apr 16th
You can take the boredom out of peepcode by running it at 1.5x speed using Quicktime.
Apr 3rd
January 2008
3 posts
RFC4366 (implemented in nginx, firefox 2, etc) makes it possible to run multiple SSL sites off a single ip/port
Jan 10th
Forget sshfs; transmit is the best way to hack files on a live site.
Jan 8th
rspec: integrate_views OR DIE!!
Jan 2nd
December 2007
5 posts
Dec 7th
“It’s going to be Monday morning until next Wednesday”
Dec 7th
Yeah, Radiohead’s recent release was great, but they forced you to sign up to a spam list just to buy it. If you email them asking to take you off, they don’t. Magnatunes.com has been doing the drm-free thing for years, and doesn’t spam you (or even require a valid email address).
Dec 6th
Leopard desktop sharing: port 5901, vnc://
Dec 4th
Used Yugma in production (view-only) - works fine.
Dec 3rd
November 2007
33 posts
Solaris: ps -Af
Nov 30th
Yugma: Free, skype integration, full control, easy (java applet on a web page, so zero-install)… HILARIOUSLY slow.
Nov 30th
glance.net : seems to be share-only (no control), still quite slow, fairly easy setup, costs money
Nov 30th
yuuguu.com: Slightly harder to setup, free, still horribly slow.
Nov 30th
Screen sharing: cross-platform, very easy, small install: copilot.com. Cons: expensive, very very very slow.
Nov 30th
Nov 30th
Eventmachine for simple socket ruby apps.
Nov 29th
You can’t override initialize with ActiveRecord models. Instead, use the after_initialize callback.
Nov 29th
Fast Resume: before I leave, I write down whatever I was working on. When I start in the morning I can find my context much faster.
Nov 28th
Nov 22nd
I always forget how to easily update multiple models in a single rails form. Here it is: tumblr_is_stupid fields_for ‘hubbub[]’,u do |user_fields| tumblr_is_stupid tumblr_is_stupid user_fields.check_box :is_admin tumblr_is_stupid tumblr_is_stupid end tumblr_is_stupid Hubbub.update(params[:hubbub].keys.collect{|k| k.to_i},params[:hubbub].values) I’ve had to replace...
Nov 21st
Nov 16th
icalx.com - ical sharing without .mac
Nov 16th
sudo dscacheutil -flushcache (lookupd is gone in leopard)
Nov 14th
http://rails.savvica.com/2007/11/6/email-veracity-plugin
Nov 14th
On OSX, mysql log files are in the mysql data dir, probably /usr/local/mysql/data . Look for a file ending in .err. You can’t see them in /var/log, or the system log viewer (which is called Console.app, for some reason).
Nov 14th
(Oh, and for what it’s worth, you *can* fit a bike in the back of a black cab. But it’s better to carry a spare tube)
Nov 14th
How to fix your bike: http://www.sheldonbrown.com/canti-direct.html (with instructions that are so good, I can follow them at 8am)
Nov 14th
Using InnoDB, extended inserts (1000 records per instruction) are around 26 times faster than single inserts.
Nov 13th
If you tell iTerm “unlimited scrollback buffer”, then run a 1000000 line .sql file inside a mysql shell, iTerm will use 1.5gb of memory and then crash. I want “[ ] unlimited scrollback, but don’t be stupid about it”
Nov 13th
cd /usr/local/mysql; ./bin/mysqld_safe &
Nov 13th
After a leopard install, your /etc/httpd.conf file is preserved but ignored. The real file is in /etc/apache2/httpd.conf. Note that spotlight won’t find this for you.
Nov 13th
Leopard’s Terminal app finally supports tabs, but the tab name isn’t displayed in the tab (the command name is, instead). It’s no replacement for iterm.
Nov 13th
Code formatting: Syntaxi / Syntax gem
Nov 9th
Nov 9th
Real Productivity by Gregory Brown →
“In this global community of hackers, we have limitless access to criticism from very smart people.”
Nov 9th
Quicklook from command line: cat ~/bin/ql #!/bin/bash qlmanage -p “$1” >& /dev/null
Nov 9th
AAAH, but if you do that, when the app restarts all the stickies go back on the same space. No solution yet..
Nov 9th
You can’t name leopard spaces, and you can’t use different backdrops. To tell them apart, put sticky notes on them using http://www.jimmcgowan.net/Site/StickEmUp.html
Nov 9th
“We could not process your order because of geographical restrictions” I was really trying to do the right thing. No wonder people pirate music.
Nov 8th
To make any ruby script run in your rails environment, use script/runner, or add these lines to the top: require File.dirname(__FILE__) + ‘/../config/boot’ require RAILS_ROOT + ‘/config/environment’ (You might need to do it that way if you’re using Daemonize)
Nov 8th