firebus's picture

Babby name search

I got stir-crazy and made a Splunk app to explore the Social Security Administration's database of baby names, which goes all the way back to 1880!

If you want to set it up on your own instance of Splunk the app is on github: Warning - there's a lot of kludge involved in getting Splunk to handle data this old.

I've also got an EC2 micro running it - drop me a line if you want access. I'm going to try to do another Splunk Babby app while I'm on leave...

firebus's picture

Ndleton design pattern

It's a very old joke so I probably only need to tell you the punchline.

The Ndleton design-pattern

firebus's picture


A couple of years ago Wangston proposed taking the prime factors of your age and meditating on those years of your life on your birthday. (And being excited when you have a prime birthday - it's like starting over!).

A couple of variations on that came up recently. First, if you have repeated prime factors, you could combine them to have a more interesting age to recall (there's only so much time you can spend contemplating age 2). For example, 28 -> 2 * 2 * 7, so you'd take 4 and 7 instead.

firebus's picture

Fun with integers

php > print 1100690227200 / 1099511627776;

php > print 1100690227200 % 1099511627776;
PHP Warning: Division by zero in php shell code on line 1


php > print PHP_INT_MAX;

php > print gettype(1100690227200);


There is no integer division operator in PHP.

Operands of modulus are converted to integers (by stripping the decimal part) before processing.


firebus's picture

Graphing ESPP calculator


  • This one plots the net profit of qualifying vs. disqualifying distributions over a range of sale prices.
  • This graph does not consider the annualized return, which is much higher for an immediate disqualifying distribution (you sell right after you buy) than for the corresponding qualifying distribution, assuming you have to hold for 18 months.
  • This graph also omits any treatment of the probability of a given sale price given the market price.
firebus's picture

423-Qualified ESPP Tax Calculator


  • An ESPP is a benefit plan that allows employees to purchase stock from their company at below market price. Usually income from your paycheck is withheld for a certain period of time (say, 6 months) and then used to buy stock at the end of the period.
  • Your tax rate for the transaction depends on how long you hold the stock before selling it.
  • To get favorable tax treatment, you have to hold the stock for 2 years after the grant of the ESPP (the start of the withholding period) and 1 year after the stock is
firebus's picture

Better grep

So, this is maybe the dumbest thing ever, but since I've been working a lot lately with a large codebase that's new to me and has many odd dependencies I do this a lot:

grep -lr someFunctionName someRepositoryWorkingCopy/

And for every interesting hit, I get about 5 hits from inside a .svn directory which makes it hard to see anything.

So then I have to go back and say

grep -lr someFunctionName someRepositoryWorkingCopy/ | grep -v svn

firebus's picture

ThoughtWorks Studios

After a long incubation, the ThoughtWorks Studios redesign has launched.

This project was a from-scratch rebuild of an existing Drupal site. The primary goals of the project were a major UI update and reorganization of content types/relationships to support a more structured presentation of content, and to make it easier for content editors to make updates.

firebus's picture

Strongarm/Features use cases uncovered

I'm launching my first project that uses Features heavily, and I've run into some of the limitations discussed in this post by Bill at Funny Monkey.

Bill talks about the difficulties in deploying multiple sites from a set of Features, and then keeping those sites in sync with the Feature as it evolves, and how that process is incompatible with Drupal's goal of making it possible for non-technical content admins to do more things.

Syndicate content

Powered by Drupal - Design by Artinet - Amazon Affiliate