One of the recent improvements to my little blog has been moving Google ads from the sidebar to every third post on the main page. In attempting to detect whether a full-size leaderboard ad would fit, versus a banner ad, I’ve found that loading a responseText object from createXMLHttpRequest doesn’t parse Javascript.
Since there really isn’t any good way to get window resolution from PHP, I hacked around it a bit. See, I have one adsense.php that serves up all the ads. I just do a global $adtheme; ‘checkres’ is a special case that includes some Javascript to detect the window’s internal area.
It basically works like this.
if (window.innerWidth >= 980)
{
google_ad_width = '728';
google_ad_height = '90';
google_ad_format = '728x90_as';
}
else
{
google_ad_width = '468';
google_ad_height = '60';
google_ad_format = '468x60_as';
}
And then the rest of the Google adsense variables.
Popularity: 5% [?]
Since my router crashed (about as hard as I could throw it), I’ve been minus a gateway/firewall for the house, and since it had the wireless access point on it, I’ve been minus wireless.
A couple of newlywed friends moved in with us for a while, and they brought with them one Toshiba laptop with one PCMCIA and one ExpressCard slot.
The solution was to boot up their laptop with the Ubuntu 7.10 live CD, pop in the Prism2 card from the old router, scp over the backups of the firewall scripts, and ifconfig stuff everywhere. Not only is there wireless again, but I’ve turned them on to Linux, and maintained the house’s freedom from Microsoft.
Popularity: 4% [?]
I’ve made a couple quick changes to the site. The first and probably most noticeable is that Google ads went from the sidebar to the content; the idea was to make it a bit less intrusive, and a bit more likely that readers will actually see stuff they’d want to click.
The other change was the addition of the two donation buttons. One goes to my Thinkgeek wishlist (I’m not expecting anyone to buy me a $299 RFID door lock), and one to a PayPal donation page — Morph said it’s actually possible to make a couple bucks off of it.
So, if you feel like supporting my hacking habits, well. :-)
Popularity: 3% [?]
Turns out the softbeep hack I was using to work around my PC speakers not beeping was screwing up Mutt. Solution: unset LD_PRELOAD in ~/.bash_login. Mutt loads up fine, and beeps still go through softbeep.
Popularity: 4% [?]

moar funny pictures
Popularity: 3% [?]
I was in the right neck of the woods, but the wrong tree.
It’s not hotkey.ko going away that was screwing me. I still don’t know exactly what it was, but I’ve figured out a workaround.
Updated the static page.
Popularity: 4% [?]
Well, I finally got around to figuring out why hotkey support went away in the upgrade.
Turns out /lib/modules/2.6.22-14-generic/kernel/drivers/acpi/hotkey.ko (which was there in 2.6.20) doesn’t exist anymore. I also can’t find it in the APT repositories, which means I’m SOL until I get around to compiling it by hand.
Greaaaat.
The LCD dimmer is also a little wonky. It goes bright-dark-bright-dark-bright-dark-dark-dark-dark (instead of bright-darker-darker-darker-darker-darkest).
Popularity: 4% [?]
Irony is screwing with udev for a while, finding it’s too much of a pain in the ass, and writing a Perl program to interface with HAL instead.
Anyway, I wrote a program to run commands whenever anything (USB drive, SD card, joystick, whatever) is inserted or removed a while back, and I spiffed it up a bit so anyone can use it. I’m still making it pretty, but I’ll post source in a bit.
Oh, yeah. In my hacking, I noticed that ssh-agent is incapable of deleting an identity when the (public?) key file is no longer accessible — e.g., mount removable media with ssh key, load ssh key, unmount media, and you can’t delete it. Bug in ssh-agent?
[UPDATE] Source is here.
Popularity: 4% [?]