Hi, I'm Abhay Kumar. I like to throw up interesting things I encounter here. You can also see the result of my mustache pact with my coworkers, check out what I'm up to or see the few photos I take. I like to receive email and instant messages (AIM / Jabber), as well. Some links of interest: Calais Text Tagger, Powerset
Ever do something like this in a Rails app and think it was really awesome and convenient?
all_content = Post.find(:all).map(&:content)
Symbol#to_proc is really neat but is expensive as heck.
Here’s some sample benchmarks:
user system total real
without to_proc 0.840000 0.000000 0.840000 ( 0.858780)
with to_proc 1.780000 0.020000 1.800000 ( 1.816275)
That means code that looks like this:
(1..100).inject(&:+)
looks really neat but is quite a bit slower than
(1..100).inject {|sum, n| sum + n }
ActiveRecord, your Ruby-Fu may be strong but it’s going to cramp my style.
I got this in my email today so I thought, why not? Use this 20% off referral code and I’ll have a chance to win an iPhone I’ve been coveting for about as long as everyone with one has been mocking me for not having it. The first place winner also wins a MBP but I highly doubt I’ll get that far. I’m fine with Top 5.
Design By Humans 20% Off Referral Code: abhay (Expires July 6 @ midnight)
The super awesome designs that I own:
The only unfortunate part of it is that you have to pay tax in CA. Bah!
I haven’t been able to download the new Firefox 3 package all morning so I went hunting for mirrors.
Here’s a direct link for those on Mac and wanting the en-US release: dmg, checksum
There’s a full mirror list where you can get more download links while the mozilla.org site stays up. You can find your platform and language via that list. More examples: linux-i686, win32
This post is mostly so I remember this myself but when I logged into my VPS this evening and tried to use yum, I got the following silliness
Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=x86_64 error was
[Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again
I’m not really sure what’s going on over there but I’m impatient.
I just modified the mirrorlist line in /etc/yum.repos.d/fedora.repo
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?path=pub/fedora/linux/releases/$releasever/Fedora/$basearch/os
If you add country=us, to the mirrorlist url, you’ll get a more restricted repository list.
Here’s an awesome annotated ink drawing floor plan of one of the most famous fictional residences ever. I think this is going to go up on my bedroom wall as soon as I can get a poster print of it. Fortunately the artist, Russ Stutler, has given all of us a very liberal license (although this could have been achieved very simply by a CC BY-ND license) on his work:
You have my full permission to use this image. Just don’t erase my name and claim that you drew it. You are above that.
There are some links on Stutler’s site for the full-sized annotated version and several formats for printing. [via strangemaps]
Recumbent 3 a.m. conversation a few days ago:
She [sincerely and without warning]: I’m attracted to everything about you. Even the Darth Vader sword hanging on your wall.
Me [thinking]: Oh my god, that’s the sweetest thing anyone has said to me in a very long time.
Me [out loud]: Correction: it’s a lightsaber.