small greasemonkey script

May 30th, 2011

I got tired of unchecking ‘keep me logged in’ on Facebook’s login screen, and ‘keep me signed in’ on Goodreads’s signin screen. So I wrote this extremely simple greasemonkey script to do it for me:


/ ==UserScript==
// @name doNotStayLoggedIn
// @author frank brown 30-may-2011
// @description Deselect 'keep me logged in' in facebook & goodreads websites
// ==/UserScript==

var elem = document.getElementById("persistent"); // handle facebook:
if (elem != null) {
elem.innerHTML=0;
}
else {
elem = document.getElementById("remember_me"); // handle goodreads:
if (elem != null) { elem.checked=false; }
}

mklnk updated

May 23rd, 2011

After 10 years, I finally fixed the ‘/desk=all’ bug in the mklnk utility. All things come to those who wait. Download version 1.6 from the Bamboo Utilities page.

Give It Back, Barack

May 14th, 2011

medal Whereas President Barack Obama was awarded the Nobel Peace Prize for 2009 by the Norwegian Nobel Committee; and whereas the United States was prosecuting active wars in Iraq and Afghanistan in 2009; and whereas the purpose of the Nobel Peace Prize is to recognize “the person who shall have done the most or the best work for fraternity between nations, for the abolition or reduction of standing armies and for the holding and promotion of peace congresses”; and whereas prosecuting wars is the antithesis of working for fraternity between nations; and whereas killing people makes their families and nations angry enough to seek retaliation; and whereas today, in May 2011, the United States is prosecuting active wars in Iraq, Afghanistan, and Libya; and whereas U.S. troop levels in Afghanistan are higher today than they were in 2009; and whereas President Obama is an intelligent man who cannot deny he has increased the prosecution of wars during his tenure rather than reduced them;

Therefore we the undersigned concerned citizens do hereby respectfully beseech and humbly implore President Obama, in recognition of the reality of his leadership of the United States, to return the aforementioned Nobel Peace Prize to the Norwegian Nobel Committee with a letter of apology and suggestion that the esteemed members of the committee use due dilligence to do a better job researching its candidates before awarding the prize next time around.

at&t: hands off t-mobile

May 12th, 2011

As a T-mobile customer and android developer, I am opposed to AT&T’s proposed gobble of my phone service provider. The main reason, aside from my general anti-monopolistic bent, is from my perspective of an android developer.

While developing my app, I deployed numerous versions to my phone in order to test them on real hardware. I tried to test it on as many different models as possible to assure maximum compatibility. When I tried copying it to a coworker’s phone (an AT&T customer), I discovered that AT&T prohibits loading apps onto their customer’s phones unless the apps are downloaded from the android market.

Clearly I wasn’t going to post my app onto the market until it was finished. Thus, my coworker was unable to help test my app. T-mobile didn’t care who I recruited as testers; AT&T was all about denying their customers that opportunity.

T-mobile 1, AT&T 0. But if and when AT&T gobbles up T-mobile, will policies such as this be changed? All bets be off.

how I lost 2 and won 1 cherry blossom games

April 5th, 2011

My record was 1-2 at last Saturday’s Cherry Blossom Festival Go Tournament in Seattle. Here’s how it went down:

My first round game was against Eric who gave me a 2-stone handicap. The opening was played evenly, no overt mistakes by either side. At the end of the fuseki the board looked like this: game

The black stone two spaces to the right of the bottom side star point looks strangely placed.

White invaded the bottom by playing the 3rd line knight’s approach to the black group in the lower left corner. Black attached, and white played a 2-space extension to the right on the 3rd line.

This sequence was played out with a few more moves, after which Black got sente whereupon he invaded White’s upper side. The result of Black’s invasion was a ko.

During the resulting ko fight Black made a threat against the invading white group on the bottom. White ignored it, black captured, and white then managed to save over half of his group by sacrificing 5 stones. This was Black’s fatal mistake since the top ko was worth 2 or 3 times as much as the 5 stones he got in compensation. I should have realized that White could sacrifice those stones and if I had, I would never have played that threat. I had others and White didn’t have so many.

My second round I played White against Aki. He came out of the fuseki with a distinct lead, so I invaded and managed to live, destroying a large portion of his potential territory. Consequently I won.

The third and final round I played Job who gave me two stones. He played aggressively and made a mistake in the opening, allowing me to capture a large group of over a dozen stones on the left side which put me ahead. Later in the middle game however Job started a fight on the bottom, and when I took my eye off the captured group from the opening, White used the fight to spill over into that area and cut off one of my encircling groups. Because it had nowhere to run, and the encircled group had more liberties, White successfully rescued his ‘dead’ group and turned the game around.

the good, the bad and the mpg

March 29th, 2011

My friend A has reached her final week of preparing for a National Board Certification for teachers. One of the requirements is to submit some videos. She asked for help editing and burning the videos to DVD. I confidently agreed, since I’d found iMovie and iDVD on my Mac pretty easy to use when creating amateur videos before.

Ha.

The video files she gave me were AVI. iMovie won’t import AVI. Luckily, she brought her camera and I was able to import two of the clips directly from the camera. Preparing them for iDVD was simple, if time consuming. Disc one of two was complete.

Unfortunately the clips for the second disc weren’t on the camera, so I asked a coworker with lots of AV experience for advice. He suggested using ffmpeg to convert the AVI to MPEG-2, the standard DVD video format, then edit that in iMovie. I installed ffmpeg on my Ubuntu 10.04 machine and used it to generate the mpg file. The resolution was so bad I couldn’t use it, but my coworker performed the same conversion on his Ubuntu 10.10 machine and that one was perfect.

I copied the mpg to my Mac and discovered (surprise) that the dastardly duo iMovie and iDVD won’t import mpg files either! Drat, foiled again! Apple hates open formats, I keep forgetting.

Googling ‘imovie mpg import’ listed several third-party apps for conversion, but they all wanted money for their software. Bah, humbug, I’m only converting one clip for a friend and she’s a poor teacher.

So I fired up my Fedora laptop and googled ‘linux mpg dvd burn’ and quickly found a post describing how to do it using freely available open source tools.

The first tool is dvdauthor, which I used to create the DVD file structure from the mpg file. Then I used mkisofs to create an ISO image from the file structure.

The final step was burning a DVD from the ISO using good old K3b.

It’s not fancy, there’s no menu and I couldn’t edit it but the video plays perfectly in our DVD player. S delivered the discs to A and mission was (finally) accomplished.

earth, canon & ubuntu

February 27th, 2011

1. I first heard Earth (Dylan Carlson’s band) when their CD A Beaurocratic Desire For Extra-Capsular Extraction was playing in Everyday Music on Capitol Hill. I had to ask the girl behind the counter what it was. I was intrigued even more upon learning that Carlson was a friend of Kurt Cobain’s from Olympia, and that the band was local.

Then a couple of months later my physical therapist mentioned he was a fan, and I decided to buy their recordings. I got The Bees Made Honey in the Lion’s Skull because the title and cover art is so cool.

Well, to an old fart like me this band basically sounds like heavy metal Eno. Slow, heavy riffs repeated endlessly. Nice ambiance, but not on my top ten list. OTOH they’re playing a new CD release gig at the Tractor on Thursday, and I’m sorely tempted — I bet they’re killer live!

If you do like this sort of thing, I suggest checking out Sunn O))) who do the same thing but are way more panoramic and less typical.

2. I wanted to scan one of Earth’s CD inserts and clip the band’s logo for illustrating this blog post, but couldn’t because my scanner is a Canon Pixma MP990 aka ‘piece of crap’. Anyone considering this multifunction printer/scanner/copier, beware! The only thing it does well is scan. But, if the printer runs low on ink, it won’t scan! Which is the height of stupidity because you don’t need ink for scanning. The paper feed mechanism the printer uses jams more often than not, and even when miraculously it doesn’t jam, it takes forever to print. Grrrr.

3. The server hosting this blog was running Ubuntu Server 6.06 LTS until a few hours ago, when I upgraded it to 8.04 LTS. Support for version 6.06 runs out in April so I got in gear, gritted my teeth and upgraded the distro. Happily, it took less than two hours and I had no major problems (YMMV). I figured jumping two major versions was safer than going all the way to 10.04 LTS in one leap. This should make it easier to upgrade Apache2, PHP, etc.

sfd mobile hits the market

February 16th, 2011

splash screen I just published my first app in the android market: SFD Mobile. Since I work for the Seattle Fire Department, this was a natural idea for an app. Thanks to data.seattle.gov for making it possible.

Since it’s my first real app in droid-space, I’m very curious how folks like it and what they think. Of course it’s only of interest to Seattleites and/or fire buffs.

I certainly learned a lot of J stuff writing it, mainly JSON and Java. I’m looking forward to writing future apps, after our next home improvement project is complete.

Surprisingly, the Android Market category list does not include ‘public safety’ or even ‘government’ so I chose, pseudo-randomly, to tag my app ‘travel’.

“Don’t listen to me”

January 23rd, 2011

I was a freshly-graduated freelance graphic designer and was hired to design a marquee poster and “one-sheet” ads by an independent filmmaker. His film had recently won an award and as a result he got a distribution deal, but had to provide the advertising. I was hired because I did the film’s original titles and credits, and subsequent brochure, all of which he liked.

This was a bigger contract. My design included a full-color photograph with special effects (special for the 1970’s). I hired a professional photographer as subcontractor who provided the 4 x 5 transparencies which I included in the packet which went to the printer. I did the original design, the layout, and provided camera-ready copy for the printer.

After accepting the job, the printer’s rep called me and said “We’re sorry but we can’t handle the size you specified for the job. Our presses are too small for that. Would you accept posters which are 2 inches shorter?” I told him I’d call him back after consulting with the client.

I called the filmmaker and explained the situation, and asked “should I accept the printer’s offer and change the size?” He said to go for it. So I called the printer back and gave the nod.

A week later the printed posters arrived. They were beautiful. Custom typography, eye-grabbing design, in rich vibrant color. I delivered them to the filmmaker who gave me my check.

A couple of days later the phone rings, and the filmmaker on the line is furious. “These posters are too small! The theaters won’t display them because they don’t fit in their cases!”

I gently reminded him that the printer had told us they couldn’t print the original size, and that I’d authorized them to print the smaller ones. “Who told you to tell them that?” he demanded. “Uh…you did,” I replied.

To which the filmmaker said, quote: “Don’t listen to me!”

And he was right. I was the professional and he hired me to make the right decisions. I should have found another printer. But instead I had brought the decision back to the client who only knew he wanted the job ASAP and wasn’t qualified to make that decision.

It was my bad. I learned a lesson, the hard way. This customer never hired me again.

xmas is like my mom

December 24th, 2010

mistletoe Let’s start with a disclaimer: I am not a Christian, or a Jew, or a Muslim. Or a Hindu, or a Sufi. Maybe I have some Buddhist sympathies but I don’t practice any organized religion, and don’t believe in a God other than admitting that there is much about nature and the universe that we don’t understand, and trying to treat all living things with respect.

Now that I’ve got that out of the way, let’s proceed to today’s thesis: speculation about the origin of the origin of Christmas.

Christmas itself is a holiday for commemorating the birth of Jesus Christ, and is the first of the twelve days of Christmastide. However, many non-Christians also celebrated traditional holidays around the time of the winter solstice — for instance Saturnalia (Roman), Yalda (Persian), Hanukkah (Jewish), Diwali (Hindu), Yule (German), and Bodhi Day (Buddhist).

Why are there so many holidays scheduled around the winter solstice? Because, clearly, the shortest day of the year is also the gloomiest. Sunshine tends to cheer people up, whereas darkness has the opposite effect. So, creating a big hoopla on the gloomiest day of the year would counteract the depressing force of the season and help folks make it through to springtime.

This has both logical and emotional appeal. But lately I am annoyed by the extremes to which this strategy is taken. I believe it’s overdone.

“The most wonderful day of the year” croons the darned radio, that just flips me over the edge. Ai-yi-yi! Some years I can handle Christmas songs better than others. Sometimes I even enjoy them. Not this year.

It reminds me of the way my mother likes to make sure she arrives at the airport with plenty of spare time in advance of her flight’s boarding. She probably feels more secure that way, so she doesn’t worry about missing her plane. But the consequence is, you spend lots of time sitting in the airport.

Overdoing the Christmas spirit is like waiting in the airport hours in advance of your boarding time. Both strategies are well-intentioned. But both are just too much for this cranky old codger.

Namaste.