July 2008
26 posts
:created_at => Range
Did you know:
ActiveRecord::Base#find does the right thing with ranges?
Article.find(:all, :conditions => { :created_at => (2.weeks.ago..1.week.ago) })
It does exactly what you’d think it does!
More & Tricks
Compare:
> def double(n)
> n * 2
> end
> (1..5).map {|n| double(n)}
=> [2, 4, 6, 8, 10]
> (1..5).map &method(:double)
=> [2, 4, 6, 8, 10]
Explanation: method returns a Method object representing the named method. Method defines to_proc to return the Proc corresponding to the method. And we know that our trusty friend & tries to convert the object to a Proc...
peterwknox:
dangurewitch:
New CHTV: Font Conference. Wrote this one with invaluable help from Streeter. It’s particularly fun, since it features nearly everyone I work with. Enjoy, and please digg it if you dig it.
Hahaha, this is hilarious. “Mailbox! Mailbox! Open Mailbox!” Quite clever indeed.
Relationships are like startups. If you join one because you think it will be...
– Charlie (via wreckandsalvage via peterwknox)
Running for Office: It's Like A Flamewar with a... →
An xkcd-inspired homepage. For a guy running for State Representative in Kansas. WJW. (via DF)
Word Movement in Terminal →
Use ⌥← and ⌥→ to move by whole words in Terminal, just like every other Mac application. If you haven’t set this up already, you should.
leachim6's hello-world →
Hello world in every programming language
Would you tell me, please, which way I ought to go from here?”
...
– Alice in Wonderland
Your spent two weeks negotiating your new Infiniti with the dealership and got...
– Tim Ferriss
The guy is (sorta) nuts, but he’s got a point.
iForgot →
Apple’s (brilliant) domain for MobileMe password resets. This almost makes up for all the MobileMe screw ups today.
marco:
Pam Newman:
you know you’re a new yorker if you say “Waited on line,” rather than “Waited in line.”
That was very intentional. I’m from Ohio, and I grew up saying “in line”. But I deliberately say “on line” now (I have to slow down and think about it every time) because I live in New York.
It’s learning the local language.
No way. I’m from Ohio too, but I refuse to...
A Thought on Digital Recipes
I just tried MacGourmet 2 and Measuring Cup but there are two big problems with both:
I have to enter the recipes myself. While this sucks, I’d do it if there was good reason/the interface was nice enough.
I have to have recipes to enter. This is why online recipe sites win hands down right now. Collective recipe collection + ratings & reviews.
Now that I’m thinking about it,...
Senate Approves Telecom Amnesty, Expands Domestic... →
The Democrats’ presumptive presidential nominee Barack Obama (D-Illinois) voted for the final bill, despite intense lobbying by supporters who used Obama’s own online organizing technology to try to hold him to his promise to fight any bill that included amnesty.
Dammit, Obama.
If you try to start a startup right out of college and it tanks, you’ll...
– Hiring is Obsolete
I Am Legend (Alternate Ending) →
I Am Legend has been released on iTunes with the alternate ending. If you’re looking to buy or rent it, I strongly recommend this over the theatrical version.
A Look at the Presidential Candidates →
The Big Picture is one of the best new blogs around. This post is a perfect example why. Simply splendid.
Believe Me, It's Torture →
The inhalation brought the damp cloths tight against my nostrils, as if a huge, wet paw had been suddenly and annihilatingly clamped over my face. Unable to determine whether I was breathing in or out, and flooded more with sheer panic than with mere water, I triggered the pre-arranged signal and felt the unbelievable relief of being pulled upright and having the soaking and stifling layers...