the further adventures of

Mike Pirnat

a leaf on the wind

Next Page »

The Shell Meme

Since everyone else is doing it...

$ history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
145 ls
143 cd
136 vim
108 svn
90 jobs
65 %1
50 %2
47 nosetests
47 less
21 grep

%1 and %2 are usually me hopping back into backgrounded vim sessions. jobs is me trying to remember what all I've already got open for editing. The other things should be pretty self-explanatory. :-)

Read and Post Comments

The Week That Would Not Stop

Bleah. Totally run down. Stressed out, burned out, and all-around fried. But still clinging desperately to life in the hopes that it might all settle down at some point. (It has to settle down, right?)

Thanks to a bumper crop of ragweed, I have spent the last two weeks wanting to claw my eyes out. Puffy. Sore. Goopy. Crusted over when I wake up. I feel like someone has scraped sandpaper over my corneas. I feel like I haven't slept since the allergies really kicked in.

Work is a super giant happy fun ball of stress as I attempt to coordinate a lot of last-minute things, deal with incomprehensible bug reports, and generally attempt to save the world. So far... meh... I think the world's still in trouble. It's taken me until today to start working on the things I was supposed to be doing on Monday. I guess it would help if I could get more than five minutes of uninterrupted time, but apparently that's out of the question at this point. *sigh*

I'm way behind on dealing with some vaguely important email for Clepy. I have had a tiff with DirecTV over their habit of failing to send me a bill and then charging me lots of late fees. (Surprisingly, not the first time they've done that to me...)

And it doesn't help that I've had things to do every night this week: Clepy (and post-Clepy festivities) on Monday, wine group Tuesday, German class Wednesday, and an appointment tonight. Tomorrow, I expect I'll probably just stay late at work, except that the parts for the new closet organizer system thing have arrived and I want to get started on that too.

Good lord, it's Thursday, and I still haven't picked up the new Star Wars DVD's, with the Han-shoots-first-thank-you-very-much original cut. For those that know me, that should give you an indication of what a general shitstorm it's been lately.

On the plus side, I finished The Confusion over Labor Day weekend. On the minus side, I still have about a thousand pages (hardback!) of The System of the World still to go... by which point I suspect that I will need to re-read Cryptonomicon since it has enough bits that tie in with the other books. It'd be easier if my eyes didn't feel like they were about to explode out of my head (see above).

...And I think I might have finally hit the point where Gentoo in particular, and Linux in general, is dead to me, the way someone who crosses Tony Soprano ends up in the deli slicer, or taken out to the Pine Barrens and disappeared. Midway through my third (fourth?) day of trying to get the emerge -eav world step of the upgrade to gcc-4.1, I am just about at the end of my geek rope. I fell in love with Gentoo because its packaging and update system "just worked", freeing me up to waste my time configuring and tweaking everything else to be just so. But this update is just insultingly murderous, as all kinds of supposedly stable things just won't fucking build right--because, y'know, that would be too easy. So, even if I have to turn in my geek badge and live life as a lesser mortal, beholden to the software update whims of Apple, I think that'd be okay with me, because this kind of time-waste is something I simply cannot allow in my life any longer.

Grr. Argh!

Read and Post Comments

January Link-o-Rama

Now that I've gotten caught up on my huge backlog of email, it's time to close some tabs and share some links, because it's more fun than doing anything productive. Submitted for your approval:

Chunk Norris Facts will teach you all sorts of interesting things about Chuck Norris; for example, "the chief export of Chuck Norris is pain." Not to be missed.

Learn all about sushi with the Sushi Eating HOWTO. (Kind of self-explanatory.)

Can't get enough "Firefly?" I certainly can't. Check out Escape Key's "Mal's Song", an expanded version of the "Firefly" theme. It's a bit filkier than my tastes usually run, but I've gotten it stuck in my head anyway. Plus, if you didn't fill your belly with sushi (see above), you probably have room for a tasty Fruity Oaty Bar!

When you're done watching the Fruity Oaty Bar video (and putting the MP3 on a loop for a few hours; don't be embarrassed, it's perfectly normal), some of you might be amused by IBM's Linux cartoons. While I was entertained, my inner shareholder wonders how much they paid for those.

Transformer di Roboter present "Stranger in Moscow", a musical gem that uses the Macintosh startup chord as its bassline. No, seriously!

Retrievr lets you search Flickr by sketching. It's wickedly mind-blowing!

I hooked up my new keyboard (a Christmas present) today to see how effective I'd be at typing without any labels on any of the keys. It turns out, with the exception of well-formed (aka tricky) passwords, I'm quite good with it. I also really like how different regions of the keyboard have different resistance to touch, so your hands get a good feel for what keys are what as they are being struck. The only thing that kind of pisses me off is that the Scroll Lock and Caps Lock lights don't seem to light at all (the Caps Lock would probably be helpful, don't you think?), and the Num Lock light seems to be flaking out--typing causes this LED to flash and sometimes go completely dark. I guess I wouldn't particularly miss these if they went away, but they are kind of annoying and really detract from the overall quality of the keyboard. Alas, I think my search for a new "perfect keyboard" must press any key to continue... (Time to find someone who makes a USB equivalent of the old Apple Saratoga keyboard.)

Finally, Minifesto is a cute tool for making animated icons out of your favorite snippet of text, suitable for generating excellent customized LiveJournal icons.

Read and Post Comments

Hibernating Penguins

Partly because I don't want to lose these links, and partly because David Stanek wanted some advice on getting his Gentoo boxen to hibernate... Here are the two most useful links that I came across, which got me working without any troubles:

Most important for me with my ThinkPad's clock drift issues was to make sure to set SaveClock yes. This means I don't have to use rdate or ntp to fix the time after reawakening, which is problematic if there's no Internet access handy at the time.

Since my ThinkPad doesn't support ACPI, I whipped up a simple script to use APM to monitor my battery charge and automatically hibernate once the charge drops below a given threshold. On my laptop, I put it in /usr/local/bin/autohibernate.py and added it to my /etc/conf.d/local.start so that it automatically kicks off as soon as I boot up.

So, there you go, Dave! Hope that helps!

Read and Post Comments

In Which Apache Reverse Proxies for Twisted Running MoinMoin

I'm posting this more to remember how the heck I got it working than to be any sort of definitive reference. But some folks might find it useful...

In /etc/portage/package.keywords:

www-apps/moinmoin ~x86
www-apache/mod_proxy_html ~x86
dev-libs/libxml2 ~x86

Emerge stuff:

emerge apache2
emerge moinmoin
emerge libxml2
emerge mod_proxy_html
emerge twisted

Read a bit of Apache Week's excellent and helpful article on running a reverse proxy on Apache. Admire its usefulness.

In /etc/conf.d/apache2:

APACHE2_OPTS="-D PROXY"

(plus whatever you would have had otherwise)

In /etc/apache2/httpd.conf:

<IfDefine PROXY>
    LoadModule proxy_module                  modules/mod_proxy.so
    LoadModule proxy_connect_module          modules/mod_proxy_connect.so
    LoadModule proxy_ftp_module              modules/mod_proxy_ftp.so
    LoadModule proxy_http_module             modules/mod_proxy_http.so
    LoadFile   /usr/lib/libxml2.so
    LoadModule proxy_html_module             modules/mod_proxy_html.so
</IfDefine>

In /etc/apache2/vhosts.d/20_wiki.domain.com.conf:

<VirtualHost *:80>
    ProxyPass / http://localhost:8081/
    ServerName wiki.domain.com
</VirtualHost>

I chose to run the twisted server on 8081 because I want to play with TurboGears in the coming days, and its standalone server likes to run on 8080 by default, which is also where twistd wants to run by default. I'd rather have the next "new guy" running on its default as I play with it; that should make life slightly easier.

Follow instructions on creating a wiki instance.

Follow instructions on running Moin behind a Twisted server. Edit the mointwisted.py to have the twistd server listen on the port specified in the file in vhosts.d (in this case 8081).

Drop a nice little init.d script into /etc/init.d/mywiki:

#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: $

depend() {
        after net
}

start() {
        ebegin "Starting MyWiki (twistd)"
        /usr/share/moin/mywiki/mointwisted start
        eend $? "Failed to start MyWiki (twistd)"
}

stop() {
        ebegin "Stopping MyWiki (twistd)"
        /usr/share/moin/mywiki/mointwisted stop
        eend $? "Failed to stop MyWiki (twistd)"
}

Fire up the twistd server using the init.d script; connect to http://localhost:8081/ to verify that the wiki itself is running. Fire up apache and connect to http://wiki.domain.com/ to verify that the reverse proxy magic is happening correctly.

Rejoice!

Read and Post Comments

All the King's Horses

I'm slowly but surely getting my main home Gentoo box back in order after deciding to blow it away and reinstall last weekend. I had been running an amd64-native environment for about a year, and along the way I had gotten really tired of all the packages that weren't available, didn't work right, and things that were outright unsupported--like any sort of 3D acceleration for my video card whatsoever, though I will grant that it was my fault for not taking 64-bit into account when checking hardware compatibility.

I've managed to get most things working again, plus a few things that I hadn't managed to win the battle with before:

  • Mostly stable kernel--needs some small tweaks but mostly solid
  • Onboard gigabit ethernet (yay)
  • X with honest-to-goodness hardware acceleration, GL, all manner of goodness
  • A comfortable Fluxbox/ROX desktop setup
  • Automated rsync of iTunes library from my iMac to the Gentoo box; 36 GB later, all is happy
  • SlimServer, so that the house is again filled with music
  • Apache (required figuring out the Gentoo Apache maintainers' latest round of WTF)
  • Internal dev & staging environments for pirnat.com
  • photos.pirnat.com is alive again
  • PHP iCalendar installed and running again to provide personal calendar service
  • ...which means WebDAV is back too, so that Liz and I (and my folks) can all publish our calendars to each other again
  • emergeminion, my silly little emerge --sync && emerge -upv world script that mails me every morning with stuff that needs to be updated, is finally able to send mail again
  • Python 2.4.1, so that I can start catching up on some of the more recent additions to the language

I still need to futz around with:

  • Framebuffer/bootsplash
  • Onboard sound -- almost working
  • MoinMoin -- to start rebuilding my wine wiki, as I managed to lose it all when I incorrectly assumed that I had backed up the data
  • TurboGears -- to start experimenting with the latest, shiniest thing in Python web app development
  • I could have sworn I wasn't using 91% of my main disk before I blew away & reinstalled everything... Have to track down where all my space has gone.

Some useful things I picked up along the way (some after much swearing and frustration):

  • Tiger no longer seems to like burning CD's straight from ISO images. It instead turns them into very lovely ISO-9660/hybrid discs with an ISO on them--aka coasters. Dragon Burn is your friend.
  • The new Gentoo Apache setup for vhosts doesn't like to have a vhost config that begins with 01_ -- for reasons passing understanding, it wanted to always serve up index.cgi as the default resource, even without having index.cgi in the DirectoryIndex directive, and even when there were index.html and index.shtml files that it should have used in preference.
  • If SlimServer doesn't want to read your iTunes Library.xml file, even if you tell it exactly where it is, turn on debugging. This will cause everything to magically just start working--while it may cause slight embarassment on the SlimDevices mailing list, at least you've got all your playlists and music again.
  • A stage3 x86 Gentoo install can really bite your ass when you want to start updating packages if you've changed your make.conf to use a more appropriate march setting. You will have all manner of issues with things wanting to use a gcc that you never even had on your box, and no amount of fix_libtool_files.sh will save you (though it will help slightly). The trick here is needing to do emerge -e system so that the underlying system gets its act together, and then following it with an emerge -e world. It's time-consuming, but it gets the job done.
  • sstmp, the default mailer that gets installed when you throw a cron system onto your box, needs a little bit of love before it will actually do anything useful when it comes to talking to the outside world. The particularly important bits are:
    root=your_email@your_isp.com
    mailhub=mail.your_isp.com
    rewriteDomain=your_domain
    hostname=_HOSTNAME_
    FromLineOverride=YES

Once I check a few more things off of the "gosh, I'd really like to take care of that" list, I'll hopefully free up enough time or energy for something more useful--I'd like to spiff up the look of pirnat.com a bit, dive into some coding, figure out what (if anything) I might (be able to) work with Dave on presenting at PyCon in February...

Read and Post Comments

Reboot Trauma

Like a lot of folks who run Linux, I often go months between reboots. Usually, that makes me feel all spiffy and great, but sometimes it means that I've forgotten something important along the way that will bite me when I least expect it to. Today, as you have probably guessed by now, was one of the latter sort.

I use Synergy pretty heavily here at work to share one keyboard and mouse between my Gentoo and WIn2k machines; I absolutely adore it, and it's been a huge productivity booster for me. At this point, with my current setup, I don't think I could live without it. However, it does have a small tendency to freak out every now and then, causing your mouse pointer to get lost in the cold, dark ether, and not to reappear without restarting X. Generally it's not a big deal to fix--I just switch over to a text console and do /etc/init.d/xdm restart and I'm back in business (minus the state of my workspace). Today, though, trying to switch over into console land locked up the whole machine; based on the graphical noise that got introduced to the display when it died, I think the framebuffer may have been upset about things, causing the kernel to disappear in a puff of unhappiness.

I couldn't ssh into it from Win2k, so my only recourse left was a hard reset. Everything was going swimmingly until I saw this unlikely and ominous message during startup:

/dev/eth0 does not exist!

Now, this Linux box is a P3 450, almost six years old, so at this point I'm starting to be a little concerned about hardware starting to fail, which is something I just don't have time for this week. Panic started to sink in as I ran down the options of what might be wrong; obviously, the kernel wasn't seeing my card, but I hadn't touched the kernel in six months or more. How could it have been working all that time if it wasn't "right"? What could possibly have changed since my last reboot?

It dawned on me finally that I'd recently gotten the 2005.1 baselayout update. Which had overwritten my /etc/modules.autoload.d/kernel-2.6 file. Which I hadn't thought was an issue, because I usually compile in everything that I will need on a daily basis. Except, apparently, for my NIC, which for some inexplicable reason had been compiled as a module. I'm sure that, back in February or whenever I rolled it that it seemed like a brilliant idea, but it's pretty freaking daft in retrospect.

A one-line change later, I am back in business and feeling pretty dumb about the entire thing.

So, kids, today's lessons are:

  • Be extra careful when you apply a baselayout update
  • If you need a driver all the time, compile it straight into the kernel so that you don't forget it later on
  • /dev/eth0 does not exist? Check out your /etc/modules.autoload.d/kernel-2.6 file!
Read and Post Comments

Loud Grumbly Noises

Been putting Gentoo on a refurb IBM ThinkPad T23 today... Overall, it's pretty cool--even the lame-ass winmodem is supported. But the one thing I figured would be a pain in the ass is rewarding me with exactly my expectation--wireless.

Five years ago, my silly PCMCIA wireless card barely worked in Linux because it was too new. Now it barely works because it's too old/unsupported.

And, as always, the "just buy a new one" strategy is fraught with peril, as manufacturers seem to be continuing their trend of changing chipsets willy-nilly without changing the model numbers of their products.

Grrrr!!! Snarl!!! Angry words!!!

Read and Post Comments

Life, Thankfully, Goes On

The past 50 hours or so have been really quite nice and relaxing.

Friday night, we had margaritas (which I drank rather rapidly) and a tasty venison stew at [info]butterandjelly's place. The stew was great, especially with the straight-ahead Shiraz that we tapped into to go with it, and the conversation and company, as always, were heaps of fun. I even got to make friends with Butterscotch the cat, a nice little surprise since he's a big ol' fraidy-cat.

I spent much of Saturday and today assembling a new Linux box and getting Gentoo up and running on the new hardware. Not only is it mind-bendingly better and faster than what I am used to running on, it's really, really quiet. It's rather disconcerting--even my iMac is louder, and it used to be the quiet machine in the room! Athlon64 3400+, ASUS K8N board, 1GB of Kingston DDR400 memory, in a tasteful Antec SLK3700-BQE case. Stock heatsink/fan, stock power supply, and just the one 120mm rear case fan. Pictures are probably forthcoming, now that I've got photos.pirnat.com back up and running.

Visited John Christ Winery out in Avon Lake on Saturday afternoon. Their wines were okay at best; wish I could give even that much praise to the service. It was good to check them out, but I don't think I'll be going back any time soon.

Last night we watched Hidalgo and Shaolin Soccer, and had far too much pizza and wine. It felt really good.

Got a few things done around the house. (Whee, semi-motivation!)

I made breakfast on Saturday. Liz made crazy-good chicken curry with a magical jar of sauce from our trip to Stratford. Yum. It's nice when simple things like meals can be really rewarding.

Yessir, I'd say it's a real shame that I have to go back to work tomorrow morning.

Read and Post Comments

Cranky

Well, poop.

Work is utterly irritating; there's nothing quite like being ready to kill people from the moment I set foot in the office to the moment I leave. My present workload is quagmire-tastic at best, and violently uninteresting. Ugh.

Continued frustration on the computer front. I ran Memtest86 for about 24 hours and it showed zero errors, so I thought there might be some hope. So I deactivated some services in an attempt to pare down what was running, rebooted, twiddled menuconfig a little bit, and started a kernel compile.... which failed utterly as it neared completion, giving me a lovely kernel panic and locking up the box pretty hard. Rebooted into a much older, theoretically more stable kernel, and still can't get anything to do a friggin' DNS lookup, which makes it hard to see if I have a bad gcc or something that needs updating.

Damn, and blast, and other, less PG-rated terminology. I really don't want to try to reinstall without a backup, and I don't really have anywhere to back up to. Then again, if I'm having hardware problems, I'm not even sure a reinstall would help. Of course, given the whole cat situation, I don't want to have to start replacing hardware either. (Because at that point, why not just get a lovely Xserve and be done with Linux entirely? Oh, yeah, because Xserve costs a lot.)

Ugh again.

Oh, well, at least it's not like Greedo still shoots first or anything... (What? He does? You bastards!)

Read and Post Comments

Next Page »