July 2011
1 post
Jul 19th
509 notes
June 2011
1 post
Jun 15th
278 notes
March 2011
3 posts
“I’m not able to open PDF files - I don’t use a Mac. Luckily, my assistant was...”
– (via clientsfromhell)
Mar 6th
346 notes
Mar 6th
125 notes
Mar 5th
581 notes
February 2011
2 posts
najafali.com - Why PHP is better than Ruby →
hooobs: This brought a tear to my eye.
Feb 22nd
2 notes
Revisiting rebinding self on lambdas
In my previous post on the topic I determined the best method would be to pass the current self into the lambda: fun = -> context {context.thing} fun.call(self) But in a recent project I revisited the problem and discovered you can do this: class Deal def emit_a_funky(funk) #returns a lambda which takes a name argument and calls the lambda #passed in with the name argument and...
Feb 22nd
January 2011
1 post
Nested joins with Arel
Today I had to convert this old Active Record finder to the new Arel backed Active Record: @promotional_offers = Offer.find(:all, :joins => {:business => :city}, :conditions => {:businesses => {:cities => {:id => @city.id}}}) I couldn’t quickly find docs for Arel on how to do this, but after a couple stabs at it I discovered that this does the trick ...
Jan 20th
December 2010
1 post
Dec 16th
267 notes
November 2010
1 post
Ruby Procs and their execution context
I had a problem just now which involved creating a proc in one class, and executing it in the context of a different class. I pondered the problem for a little while, did a little research, and then realized the obvious solution would be to pass the current self into the proc. Example: stuff = lambda do |context, thing| context.some_method(thing) end Thought I might save someone the...
Nov 4th
October 2010
7 posts
“Debugging is twice as hard as writing code in the first place. Therefore, if you...”
– Brian Kernighan
Oct 25th
here are some cat gifs
hooobs: themotherfuckingfox: thelastgoodthing: wowsomeoneactually: xiamfuckingtiredx: laura0mck: kelseybrewer: neekaisweird: i had to. i had to too i had to too, too. my life is made. Lets run this shit into the ground!
Oct 22nd
820 notes
Using Active Merchant for recurring billing →
Note that arguments passed to the recurring method vary by payment gateway. Refer to the active merchant docs for specifics: http://activemerchant.rubyforge.org/ And if you’re using Braintree, this might be helpful: http://mandarinsoda.com/2008/06/02/recurring-billing-with-braintree-and-activemerchant/
Oct 19th
Rspec 2, Rails 3, Autotest, and Spork
So I spent a little bit of time getting all of these kids to play nice together and I figured I’d save someone else the hassle of figuring it out. Initially I configured my spec_helper.rb to use spork, fired it up and tried running ‘autotest —drb’ which didn’t work. Then I realized I should try and use autospec, since —drb is an rspec specific argument, but...
Oct 15th
My new single. She's lyke duh w1nd. →
Spread it around like peanut butter and honey.
Oct 14th
2 notes
“i know no amount of emoticons can truly describe the pain you feel right now.”
– Wes
Oct 5th
“Just read ‘batting cages’ as ‘battle cages’ and thought...”
Oct 3rd
June 2010
1 post
Jun 23rd
55 notes
May 2010
2 posts
May 8th
May 3rd
April 2010
26 posts
Apr 30th
Apr 28th
Apr 27th
Apr 25th
1 tag
Apr 25th
Apr 22nd
Apr 22nd
732 notes
2 tags
Apr 21st
Apr 18th
3 notes
Apr 17th
Apr 17th
Apr 17th
Apr 17th
Apr 16th
Apr 15th
“webosdev note to self, never try and register tap events on anchors. They don’t...”
– angrysow
Apr 12th
Apr 12th
Apr 11th
Apr 11th
Apr 11th
Apr 10th
Apr 9th
2,898 notes
Apr 9th
Apr 8th
Apr 8th
Lazerscale →
Sweet electronic trackz for freezies
Apr 7th
October 2009
2 posts
2 tags
Yay!
The fbml for a facebook profile tab can include a head element, in which you can include a stylesheet. This is extremely helpful information I stumbled upon entirely by accident.
Oct 23rd
3 tags
working with fb-board in facebook apps
when using the fb-board fbml tag, be sure that the page you embed it on responds to POSTs, or that if you specify a callbackurl, that url responds to POSTs (and possibly {I haven’t tested it} has an fb-board tag with same xid embedded in it). Otherwise when you create a post on the board, it won’t save it.
Oct 16th
September 2009
1 post
2 tags
list of facebook event types
I’m currently working on ‘remaking’ the facebook events creation form for a facebook app that needs the ability to make events associated with a resource. I was investigating all the event types and sub-event types on the developer wiki, but the list wasn’t up to date. Plus, it doesn’t show what event types and sub-event types go together. So I whipped out trusty ole...
Sep 4th
Sep 10th