Northward Midget Pole to Pole

31Mar/114

Gitweb Diffs Between Versions

Posted by Quinn

Our company deploys code into production primarily from our version control system.  I suppose all companies do, in some way or another.  We endured a long hell with CVS and a far shorter stint in the purgatory of Subversion before we went into the heavenly light of Git.

The way we do it is to tag various branches destined for certain groups of machines, archive a snapshot, then copy those out to where they belong.  This is all partially automated by an awesome (if somewhat Byzantine) home-grown software suite that I inherited once the original author left for (at least literally) greener pastures in the Pacific northwest.

I'm not normally in charge of deployment, but since I "own" the software now and the usual dude is on a well-deserved vacation, this week I'm handling the once-weekly scheduled deploy and the multitude of little tweaks that absolutely positively must go out immediately.

Our regular deployment manager sends out hand-written emails when he starts a test deploy, initiates the production deploy, then a final one when everything is finished.  Myself,  being a hacker, just can't stomach the thought of not having something like that automated.  Thus, I dug into the command that prints the deployment status of all servers and hacked it up to be slightly more informative and email-friendly, so I could just copy-and-paste its output to an email.

Then I thought, as all hackers think, "Wouldn't it be cool if I could include a link to Gitweb that shows the exact changes that occurred since the previous deploy?"  I know the previous version commit-ish deployed to each  server, and of course I know the new one, so I could do it quite easily with a simple git command.

However, I didn't want to just slap that command in there so someone could (and likely never would) issue it within their cloned repo.  I wanted a simple clickable link to Gitweb.  Anyway, the query ends up being something like this, tacked onto your own Gitweb URL, of course:

gitweb.pl?p=your-repo.git;a=commitdiff;hp=695de2d;h=fb7b608

Where hp is the previous commit-ish and h is the usual "current" commit-ish argument.

Voilà!

The next step was to group all the servers by common changes so there's only one diff link per group, and next I might try adding an --email-to option to send the email, skipping the copy-and-paste.

...and then I'll work on the bugs.

Tagged as: 4 Comments
28Mar/110

I Brake For Debt

Posted by Quinn

We've been trying a "cash budgeting" system for a few months now, and it's going pretty well.  That is, it covers our variable expenses.  I still use a bank account dedicated to relatively fixed expenses such as rent, utilities, membership dues, and minimum credit card payments.  Most of those are paid automatically, pulled directly from the account.

Unfortunately, there are two places where the system falls short.  This isn't so much because of any flaw in the idea of cash budgeting, but due to our limited funds.

The first is that we don't have anything left over to pay down the debt besides the aforementioned minimums.  I'll be relying on my annual bonus to hack away at that fecking demon.

The second is "unexpected" expenses.  We didn't fully account for birthdays or other special occasions and gifts.  "Gifts" for us mostly means for the kids (and the increasingly frequent parties they attend), since we don't usually give them otherwise.  School lunches we could roll into groceries, so that's not so bad.

However, there are those big ones that hit you now and again.  Although we do have a "Car" envelope (cash allotted for each expense goes into an olde-fashioned paper envelope), it builds over time.  Over the past week, my front driver-side tire has been angrily grinding under 20MPH.  I finally took the day off today to get it into the shop.  It's the brakes. And the rusted calipers.  And over $600.

We ain't got that much in the envelope.

So, it'll probably go on the credit card we just managed to pay off, with last year's bonus, and I'll try to pay it off again with the two "bonus paychecks" a year direct-deposited into the dedicated bill-paying account.

Oh, and I put about ten bucks on the same card for Star Wars miniatures from Miniature Market in an attempt to find one suitable to represent my scoundrel in our Star Wars Saga campaign.  Of course, since these are mostly under a dollar each, I had to buy a dozen or so to avoid paying more for shipping than for the actual merchandise.  Maybe I'll post a picture when they get here.

That's not irresponsible spending, is it?  $10 for my only hobby?

Back to "working from home" and waiting for the car.

 

Tagged as: , No Comments
25Mar/110

In Other News

Posted by Quinn

We had a great role-playing session Saturday night.  I found a group through meetup.com and we're playing the "Dawn of Defiance" campaign for the Star Wars Saga Edition RPG.  It was mostly combat this week, but quite involved with some good character twists.

The campaign has a section on Obsidian Portal.  I took a lot of notes in anticipation of doing a writeup from my character's perspective.  Our GM gives us an extra 100XP if we do it, but I usually only bother if things were interesting for my character.  So, I stayed up Saturday night into 3AM Sunday morning writing up a play-by-play of the session.

Besides role-playing, I've re-invested myself in my old website, TijuanaBibles.org.  It's been years since I've done an update.  Lately, I've prettied it up and slapped on some explicit sex ads from JuicyAds.com.  A generous visitor to the site sent me an email asking about something he'd bought.  It was a German version of a Tijuana Bible titled Schneewittchen und die 7 Zwerge.  That's Snow White to the rest of us.

He gave me permission to post it, and so I did.  With the help of Google, I attempted a translation of the libretto, with some hilarious results.

You can check it out at the site.  It's linked in the bottom menu here.  I won't link it directly into the post, as it's got some explicit content and I'd rather not have you stumble over Popeye ramming his cock straight up through Olive Oyl's mouth in case the kids are in the room with you.