October 2009
18 posts
1 tag
Madoff Typing
# We have invented a new kind of duck-typing, we call it Madoff typing.
# We just lie and hope we die before you recognize our scheme. :)
Chef’s attribute.rb
What Startups are Really Like →
The best way to put it might be that starting a startup is fun the way a survivalist training course would be fun, if you’re into that sort of thing. Which is to say, not at all, if you’re not.
All Hallows’ →
guy:
Jim Coudal on Halloween as a time to remember those we have lost. Beautiful.
1 tag
Shadow Passwords in Ruby
Want to generate a shadow password (that you can put in /etc/shadow) in Ruby?
POSSIBLE = [('a'..'z'),('A'..'Z'),(0..9),'.','/'].inject([]) {|s,r| s+Array(r)}
def shadow(password)
salt = Array.new(8) { POSSIBLE[ rand(POSSIBLE.size) ] }
password.crypt("$1$#{salt}")
end
My version of this. As per the comment there, if you aren’t getting a result that looks like...
2 tags
1 tag
The Pmarca Guide to Personal Productivity →
Go. Read. This.
Then stop reading about productivity and do something productive.
1 tag
Fixnum#to_bit_array
We just spent far too long trying to figure out how to use #unpack or #pack in some combination to convert a Fixnum (Integer) into an array of its bits. Turns out, Google provides a far superior solution:
bits = Array.new(8) { |i| 7[i] }.reverse!
Apparently Fixnum#[] returns the n-th bit. Who knew?
1 tag
2 tags
Change volume a 'quarter box' at a time
If you hold down Option + Shift while pressing the volume keys, the volume will change by a quarter of a box with each press
via finermac
1 tag
Emulate TextMate Cmd-Return in Vim
As a recent TextMate -> Vim convert, about the only thing I have really missed (and for which I have not been able to find a comparable/better plugin) has been the ability to hit Cmd-Return to insert a newline after my current one, regardless of cursor position (fn1).
Of course, I knew with a little hacking Vim could emulate this behavior; I just couldn’t quite figure out how. Google...
2 tags
1 tag
Magic Kingdom in Tilt-Shift Video
“A Day at the Magic Kingdom Park” is a never-before-seen look at the park in miniature scale. The video is created from a series of photos snapped inside the Magic Kingdom Park. And the trick is tilt-shift photography.
I think its about time for a trip to Disney!
via @ronalddevera