Search Results: "ron"

10 January 2009

Marco d'Itri: ssh-agent for unattended processes

This code allows unattended ssh(1) processes, like the ones started by cron(8), to access the SSH keys stored by a running ssh-agent(1) (which will probably have been started in a screen(1) instance). Be sure to understand the security implications of persistent ssh-agent processes and passwordless keys.
#!/bin/sh -e
import_ssh_agent()  
  local pid
  for pid in $(pgrep -u "$LOGNAME" -x -f /bin/bash); do
    local var="$(grep -z '^SSH_AUTH_SOCK=' /proc/$pid/environ   true)"
    [ "$var" ]   continue
    eval "$var"
    export SSH_AUTH_SOCK
    break
  done
 
[ "$SSH_AUTH_SOCK" ]   import_ssh_agent
# now the script can run commands like:
ssh -o BatchMode=yes hostname command

Andrew Pollock: [life] One year and five days later...

...and there was a distinct feeling of deja vu. At least the procedure itself was nowhere near as long (under 2 hours). On Thursday, Sarah had some day-surgery to have her sternal wires removed. The top one was causing her some discomfort because the skin there was the thinnest (whether that in itself was related to any of the previous incision complications remains uncertain). The surgical team popped in to pre-op to autograph their work (seriously, they initialled her chest) before they started, and asked if she wanted just the top wire removed, or all of them. We consulted the Magic Eight Ball application on my phone, and it gave a resoundingly affirmative response, so she got them all removed. Despite removing them all being a bit more surgically invasive, I think this is for the best. It means none of the other wires can cause any problems down the track requiring yet another trip to the operating room. They also did some scar revision on the top part of the scar, where it was a bit stretched (from the previous complications), so incisionally speaking, she's had almost as much incision work done as the original heart surgery. Ironically, this made the plastic surgery (laser treatment and steroid injections) she had late last year largely redundant. She took the dressing off the incision this morning, and we had our first look at it. It certainly looks a lot better than before, so fingers crossed it won't get infected this time, and the overall long-term result will look better.

Julian Andres Klode: News from the python-apt front: NEW and COOL DOCUMENTATION


I have been working the whole week on python-apt and the result is the jak branch. This implements some of the proposals I made in my last post, but has one very interesting feature: REAL COOL DOCUMENTATION. After Sandro Tosi told me in a comment in my last post that the real big problem with python-apt is a lack of documentation, I immediately started writing it. UsingreStructuredText and Sphinx, we now have a really cool and much more detailed documentation. (Although it is not really finished yet [it contains everything, but there is still room to improve]). The whole documentation is available at http://people.debian.org/~jak/python-apt-doc/, and the source is in my branch at http://bzr.debian.org/users/jak/python-apt/jak , which can be browsed via Loggerhead at: http://bzr.debian.org/loggerhead/users/jak/python-apt/jak/changes It also contains a lot of cleanup, whitespace removal (bundled in one commit), and improved docstrings. And apt.debfile and apt.gtk.widgets should work completely now. Oh, and apt.cdrom now supports sources.list.d. Posted in Debian, Python

Lucas Nussbaum: On Debian membership

The more I think about it, The more I m convinced that the both approaches that have been proposed to change the way we deal with Debian membership (Joerg s new statuses for non-developing contributors, and Lars counting of advocates) are both steps in the wrong direction. I really would like something simpler, and less technical, to become a Debian Developer. After all, what matters is that we trust new developers to make the right decisions (for example, not touch something that they are not confortable with). We currently verify that they know each and every technical bit about things that they may never encounter during their DD life, but that doesn t say anything about their ability to work with others inside a community, or their judgement when touching packages that they don t maintain. For example, we could have something inspired by the current process to become a Debian Maintainer: instead of going through 50+ questions, we could rely on advocations from existing Debian Developers to judge new applicants. The advocation wouldn t simply be +1 emails (as in Lars proposal), but would instead contain a detailed description of what the applicant did. A group of DDs (DAMs, basically) would then read the advocation emails, and decide whether there s sufficient proof that the applicant can be granted DD status. That would allow a much faster process, removing the load from the Application Managers and NM Frontdesk Members. And it probably wouldn t reduce the quality of new DDs, because of the need to collect advocation emails from several DDs. Probably the best way to move forward with that would be to work on a document (DEP?) that would list all the changes and explain them, and then ask all the developers to vote on it, like it was done for the Debian Maintainers GR. Are there some people interested on working on a first draft of such a document?

9 January 2009

Axel Beckert: Draw a Bunny

I got tagged. By splitbrain. With a really silly but funny meme. The basic rule is: Draw a bunny. So here s my bunny:
             /\ /\
             ,. ,. 
             
             \' /
            / . .\
           (   Y  )
          __\  v'/
       _-^      \
     ,'  _        
    /      \    /
 _ ;          , \\
/        __;__\ \\
\_,\___________;\_;;
Nobody said, ASCII art is not allowed and I drew it myself with aewan (Ascii art Editor Without A Name) in an xterm. But aewan was not really a help here, Emacs would have done the same job. In fact I had to fix some non-ascii characters later by using Emacs anyway. Ok, and since this are the rules:
  1. Draw a Bunny (or more)
  2. Post it to your blog with the rules
  3. Name three other bloggers that should draw a bunny
You can draw your bunny however you like. Use pencil and paper, a drawing tablet or just your mouse. It doesn t matter. It also doesn t matter if it looks crappy or not. The important thing is the bunny!
here are the three blogger I m tagging. Ehm, that s harder than the bunny. Hmmm. I think, I ll stay with the DokuWiki on identi.ca crowd for tagging. So I herewith tag:
  1. foosel,
  2. chimeric, and
  3. jaypikay
Hope, they don t mind and join the fun. ;-)

8 January 2009

René Mayorga: New toy

Today I got my Acer One AOA150, is a really nice device, Unfortunately this model did not come with GNU/Linux, so I sadly have to still pay the microsoft tax :( But the good point is that the Debian installation was a breeze, really simple, almost all hardware just works out of the box, BTW thanks to the guys who wrote http://wiki.debian.org/DebianAcerOne my goal is to get used to this laptop and made it my main work laptop, I ve always be a big fan of smalls laptops so this is a kind of a really nice device for me I guess. I also always note that a lot of people complain about the small keyboards on the mini-laptops , but I did not find such a pain, there is still a need to get used to it, but with a couple of hours using it, seeings comfortable enough for me.

Adam Rosi-Kessel: The Great Urban Chicken Debate at the Supreme Court

of Nova Scotia. My past and future colleague Trevor Smedley just lost his appeal to the Supreme Court of Nova Scotia of his criminal conviction for having pet chickens. As the Supreme Court noted in Trevor J. Smedley and Her Majesty the Queen:
They are not just any chickens - they are special chickens. They are heritage chickens that are brought to this province from Quebec.
Indeed, the court agreed with Mr. Smedley that there was nothing wrong with the chickens:
The trial judge found that they are in every way inoffensive. There is no excessive or even noticeable noise, no odour. The way in which they are kept is not unsightly. The chickens remain on their property seemingly doing no harm to either the aesthetic qualities or the quiet enjoyment of the property of the immediate neighbours. So finds the trial judge.
As I haven t seen much news about this case in the mainstream media, I m posting a copy of the complete opinion here to shed public light on the matter. I know very little about Canadian chicken law, so I m not sure whether further appeals are possible, but I hope Mr. Smedley can keep up the fight.

David Welton: Angry Perl Users

I work on LangPop.com for fun. I make a tiny bit of money from the adsense there, but nothing much to speak of. Unlike the TIOBE folks, I don't sell my data to anyone. So it can be a bit frustrating when people get all bent out of shape about the results. A case in point was my recent article here, entitled Python "Surpasses" Perl?. In case the title wasn't a dead giveaway, I'll spell things out:
  • I was poking a bit of fun at the idea that any statistics of this nature could pinpoint, to a specific month, the moment when one language "passes" another. They're way too fuzzy for that!
  • I point out that Perl is still quite popular. According to the Freshmeat metric I was reporting, Perl actually still has more code out there than Python.
And just to be clear: I don't use Perl or Python or really care which one is more popular. I mostly use Ruby these days, with Tcl, Java, and bits of C thrown in for fun. In other words: langpop.com is not an evil conspiracy to discredit Perl. However, I also had the temerity to suggest that Python might be a little bit more popular in terms of new things happening. Shock! Horror! Well, that certainly irritated some Perl users. They called my statistics lies, they misspelled my name (as well as the word "you", which is a lot simpler than my name by any standard), and some of them went off on rants that were pretty badly off target (SourceForge is never mentioned in Langpop or this online journal!). However, not once did they really get around to answering my points, or proposing any sort of valid alternative metrics. One of my favorite Linux/Free Software news sources, lwn.net published their 2009 predictions, and had this to say about Perl:
It will be a make-or-break year for Perl. If the Perl developers cannot either bring new life to Perl 5 or turn Perl 6 into something real, this language will, by the end of the year, have moved well down the road to "legacy" status.
As can be imagined, that set them off all over again. The mental image I get is a big angry bull, frothing at the mouth, and ready to stomp that damn red cape. Here's the problem, though, guys: the cape isn't what's holding you back. Trust me, I know. Once upon a time, when people spoke of scripting languages, they talked about "Perl, Python and Tcl". No Ruby, no PHP, although both existed. I happen to like Tcl a lot, and it measures much worse than Perl on all the popularity charts... worse than plenty of other languages, these days. Lately, I don't use it so much, but once upon a time I dedicated a lot of mental energy to wondering why things weren't going better. And in that community too, there were people who consistently held their fingers in their ears and yelled "LALALALA there is no problem!". In the long term, it's not an effective strategy: it makes everyone but the other True Believers think you're going off the rails, because the evidence is plain to see that things weren't quite like they used to be, that there are problems. And it doesn't really address the problem in a constructive way, either. Long term, what works is to produce good code, and get it in people's hands. The most effective way of dealing with problems of this nature includes these points:
  1. Not froth at the mouth any time you perceive a slight to your technology of choice.
  2. Talk up the cool things you're working on. Be positive, explain what's new and exciting.
  3. Acknowledge reality. For instance with Perl (or Tcl), it's plain to anyone that they aren't as popular as they once were. Don't deny it, but focus on the fact that they're still widely used, and lots of new code *is* still written in them, and that they're still the focus of a lot of work to improve them.
  4. Actually follow through. Jon Corbet's (Linux Weekly News) point is not a bad one - you can have all the internal releases and milestones and general fun hackery that you want, but at a certain point, you need to get working code out in front of people. This is something Ruby seems to be suffering from these days too (as observed from afar) - lots of next generation fiddling, and tons of good ideas and energy, but to me there is a lack of technology actually flowing my way in a timely manner. With the possible exception of JRuby, which is making lots of progress and putting good code out there for people to use.
To conclude things, since the Perl guys were so unhappy with Freshmeat, here are some statistics from Amazon and Craigslist, comparing about a year ago with the most recent numbers: As can be seen, both Perl and Python are dropping in Craigslist postings, but Perl is falling farther. As a final footnote, I am sorry about this journal not accepting comments past a certain point (10 days is the cutoff) - otherwise I get 100's of spam postings a day. Unfortunately, the software I'm using didn't deal well with alerting people to the fact that comments were closed. I filed a bug, and they're working on it.

David Welton: Angry Perl Users

I work on LangPop.com for fun. I make a tiny bit of money from the adsense there, but nothing much to speak of. Unlike the TIOBE folks, I don't sell my data to anyone. So it can be a bit frustrating when people get all bent out of shape about the results. A case in point was my recent article here, entitled Python "Surpasses" Perl?. In case the title wasn't a dead giveaway, I'll spell things out:
  • I was poking a bit of fun at the idea that any statistics of this nature could pinpoint, to a specific month, the moment when one language "passes" another. They're way too fuzzy for that!
  • I point out that Perl is still quite popular. According to the Freshmeat metric I was reporting, Perl actually still has more code out there than Python.
And just to be clear: I don't use Perl or Python or really care which one is more popular. I mostly use Ruby these days, with Tcl, Java, and bits of C thrown in for fun. In other words: langpop.com is not an evil conspiracy to discredit Perl. However, I also had the temerity to suggest that Python might be a little bit more popular in terms of new things happening. Shock! Horror! Well, that certainly irritated some Perl users. They called my statistics lies, they misspelled my name (as well as the word "you", which is a lot simpler than my name by any standard), and some of them went off on rants that were pretty badly off target (SourceForge is never mentioned in Langpop or this online journal!). However, not once did they really get around to answering my points, or proposing any sort of valid alternative metrics. One of my favorite Linux/Free Software news sources, lwn.net published their 2009 predictions, and had this to say about Perl:
It will be a make-or-break year for Perl. If the Perl developers cannot either bring new life to Perl 5 or turn Perl 6 into something real, this language will, by the end of the year, have moved well down the road to "legacy" status.
As can be imagined, that set them off all over again. The mental image I get is a big angry bull, frothing at the mouth, and ready to stomp that damn red cape. Here's the problem, though, guys: the cape isn't what's holding you back. Trust me, I know. Once upon a time, when people spoke of scripting languages, they talked about "Perl, Python and Tcl". No Ruby, no PHP, although both existed. I happen to like Tcl a lot, and it measures much worse than Perl on all the popularity charts... worse than plenty of other languages, these days. Lately, I don't use it so much, but once upon a time I dedicated a lot of mental energy to wondering why things weren't going better. And in that community too, there were people who consistently held their fingers in their ears and yelled "LALALALA there is no problem!". In the long term, it's not an effective strategy: it makes everyone but the other True Believers think you're going off the rails, because the evidence is plain to see that things weren't quite like they used to be, that there are problems. And it doesn't really address the problem in a constructive way, either. Long term, what works is to produce good code, and get it in people's hands. The most effective way of dealing with problems of this nature includes these points:
  1. Not froth at the mouth any time you perceive a slight to your technology of choice.
  2. Talk up the cool things you're working on. Be positive, explain what's new and exciting.
  3. Acknowledge reality. For instance with Perl (or Tcl), it's plain to anyone that they aren't as popular as they once were. Don't deny it, but focus on the fact that they're still widely used, and lots of new code *is* still written in them, and that they're still the focus of a lot of work to improve them.
  4. Actually follow through. Jon Corbet's (Linux Weekly News) point is not a bad one - you can have all the internal releases and milestones and general fun hackery that you want, but at a certain point, you need to get working code out in front of people. This is something Ruby seems to be suffering from these days too (as observed from afar) - lots of next generation fiddling, and tons of good ideas and energy, but to me there is a lack of technology actually flowing my way in a timely manner. With the possible exception of JRuby, which is making lots of progress and putting good code out there for people to use.
To conclude things, since the Perl guys were so unhappy with Freshmeat, here are some statistics from Amazon and Craigslist, comparing about a year ago with the most recent numbers: As can be seen, both Perl and Python are dropping in Craigslist postings, but Perl is falling farther. As a final footnote, I am sorry about this journal not accepting comments past a certain point (10 days is the cutoff) - otherwise I get 100's of spam postings a day. Unfortunately, the software I'm using didn't deal well with alerting people to the fact that comments were closed. I filed a bug, and they're working on it.

7 January 2009

Felipe Augusto van de Wiel: 8 Jan 2009

Debian

Re: Blog rewrite upcoming
Erich, it seems that you got TONS of recommendations for different blog software, so you probably already received a recommendation for Chronicle: The Blog Compiler, it is written by Steve Kemp inspired by Joey's ikiwiki. I've been also wondering about using ikiwiki and/or chronicle. :-)


From the privacy-issues-department...
This is in my draft for a long time now...

Nico, I never understood what was so private about your debian.net page (Thanks WayBackMachine!).

PS: Happy 2009!

6 January 2009

Julien Valroff: DSPAM-Community - first RC: call for testing

I was happy to receive Dov Zamir s email announcing the creation of a fork of the DSPAM anti-spam filter, called dspam-community. I have been using DSPAM for a while now, and am very happy with it, but was quite anxious that the project is left out by Sensory Networks (the company took over DSPAM in May 2007). I give all my confidence in the fork as the original author, Jonathan Zdziarski, is part of the new development team! I have prepared EXPERIMENTAL packages of the first RC of DSPAM-Community.

These are only meant for testing and should not be used in a production environment! I haven t tested these packages in depth (only tested installation or upgrade from previous official/unofficial packages).
There might still be problems due to the new names. I have built packages for i386 and amd64 architectures. They are built against current unstable distribution. They might be used on Ubuntu, but I haven t tested this yet. I have setup a quick page for these packages. All the applied patches are available for review and possible merge into git: http://packages.kirya.net/dspam-community/debian-patches/ To use these packages, add these lines to your /etc/apt/sources.list:
deb http://packages.kirya.net/dspam-community/ experimental main
deb-src http://packages.kirya.net/dspam-community/ experimental main
The repository uses secure-apt, you can hence check packages integrity thanks to my dedicated GPG key:
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys FBABB737
gpg --export -a FBABB737   apt-key add -
or
wget -O - http://packages.kirya.net/Kirya.netDebianpackagesVerificationKey.asc   apt-key add -
Fingerprint: 97A0 69D9 A150 687E 599F F168 EEFB 43B2 FBAB B737 Feel free to test the packages and the first DSPAM-Community RC.
Any comment is welcome! To the official DSPAM packaging team: feel free to take these packages as a basis for your work in case you are interested in packaging DSPAM-Community!

David Welton: Git is a Pain in the Ass

Everyone's been talking about how great and wonderful git is, and I've tried using it for a few projects of my own, on a local basis, sort of like an advanced form of 'rcs'. So I thought I'd try it out in a little bit more complicated setup, for a site I host on my web server. I want to have a main repository, that I "check out" (or 'clone', in git terms) on my laptop. My laptop can't be the main repository, because I also want to be able to commit from the web server (once in a while a quick live update is called for), so I need a stable address. Ok, I'll put it in my home directory on the web server, just to see how things work.
mkdir foobar
cd foobar
git init
Ok, so far so good. Now I try and clone it on my laptop, where I will then add files, commit, then push them. Oops, that doesn't work. You can't clone an empty repository. Ok, I add something on the server where I init'ed it, an empty file, just to give it some content. Now cloning it works on the laptop. Great, we're in business! I add a bunch of files from the project to the laptop repository, commit, then push them. Seems to be ok so far... I do a checkout on the remote/server machine, and I see my files. Good. Ok, let's try making a change on the laptop. I remove a file, commit it, push it (which is already an extra step compared to subversion... hrmph). I do a checkout on the server, but it won't erase the file I removed on the laptop. Weird. I google around a bit, and find that this is supposed to be for my own good, so I won't wreck things on the server. I need to do git reset --hard (which isn't a very reassuringly named command) there, and then a checkout, and now things work. That, however, is a lot of work just to commit and update stuff! I ask for some help on #git, where they mention the --bare option to init. Since I'm just messing around, I go back and redo the init step, wiping the old repository. Now I try and clone that to start over again. Oops, I forgot, I can't clone it because it's empty. Grrrrrr.... this is getting annoying. So, the kind folks on #git tell me I should push to the new server repository from one that's already populated. Ok, let's try setting up the laptop:
git init
... add/commit some files ...
git remote add origin ...myurl...
Now let's try pushing. Nope, still doesn't do it, I'm missing something. Frustrating. A bit more fiddling and googling, and i find:
get push origin master
Aha! It worked! Weird. And now a simple git push works too. The whole thing seems kind of shaky in the sense that it's not very confidence inspiring: I feel like it wouldn't take much to make a wrong turn and find all my files gone forever. I can see some of the advantages, and will likely stick with it - git is quite convenient for local files that I might not have bothered putting under version control in the past, but it's also a bit more "bureaucratic" in that you have more steps to do, and you have to fill in the forms just so... or else!

David Welton: Git is a Pain in the Ass

Everyone's been talking about how great and wonderful git is, and I've tried using it for a few projects of my own, on a local basis, sort of like an advanced form of 'rcs'. So I thought I'd try it out in a little bit more complicated setup, for a site I host on my web server. I want to have a main repository, that I "check out" (or 'clone', in git terms) on my laptop. My laptop can't be the main repository, because I also want to be able to commit from the web server (once in a while a quick live update is called for), so I need a stable address. Ok, I'll put it in my home directory on the web server, just to see how things work.
mkdir foobar
cd foobar
git init
Ok, so far so good. Now I try and clone it on my laptop, where I will then add files, commit, then push them. Oops, that doesn't work. You can't clone an empty repository. Ok, I add something on the server where I init'ed it, an empty file, just to give it some content. Now cloning it works on the laptop. Great, we're in business! I add a bunch of files from the project to the laptop repository, commit, then push them. Seems to be ok so far... I do a checkout on the remote/server machine, and I see my files. Good. Ok, let's try making a change on the laptop. I remove a file, commit it, push it (which is already an extra step compared to subversion... hrmph). I do a checkout on the server, but it won't erase the file I removed on the laptop. Weird. I google around a bit, and find that this is supposed to be for my own good, so I won't wreck things on the server. I need to do git reset --hard (which isn't a very reassuringly named command) there, and then a checkout, and now things work. That, however, is a lot of work just to commit and update stuff! I ask for some help on #git, where they mention the --bare option to init. Since I'm just messing around, I go back and redo the init step, wiping the old repository. Now I try and clone that to start over again. Oops, I forgot, I can't clone it because it's empty. Grrrrrr.... this is getting annoying. So, the kind folks on #git tell me I should push to the new server repository from one that's already populated. Ok, let's try setting up the laptop:
git init
... add/commit some files ...
git remote add origin ...myurl...
Now let's try pushing. Nope, still doesn't do it, I'm missing something. Frustrating. A bit more fiddling and googling, and i find:
get push origin master
Aha! It worked! Weird. And now a simple git push works too. The whole thing seems kind of shaky in the sense that it's not very confidence inspiring: I feel like it wouldn't take much to make a wrong turn and find all my files gone forever. I can see some of the advantages, and will likely stick with it - git is quite convenient for local files that I might not have bothered putting under version control in the past, but it's also a bit more "bureaucratic" in that you have more steps to do, and you have to fill in the forms just so... or else!

Uwe Hermann: Running homebrew and open-source software on your Wii, using the Twilight Hack and the Homebrew Channel

Wii I've been owning a Nintendo Wii for quite a while now, but so far only played an occasional game of tennis or the like. Over the holidays I got The Legend of Zelda: Twilight Princess, which is a really nice game in itself. What is even more interesting though, is that this game allows you to run homebrew software on your Wii. What you usually want to do, is to use the so-called Twilight Hack to install the Homebrew Channel on your Wii (you'll need an SD card and the Twilight Princess game for this). Once the process has finished you won't need the game anymore though. So, here's a quick tutorial on how to install the Homebrew Channel. I basically followed the Setting up your Wii for Homebrew HOWTO from wiibrew.org. Requirements An SD card max. 2GB in size (not an SDHC card!), an SD card reader in your PC or laptop, and the Twilight Princess game (which you must play at least once). Backup First, you'll want to backup your Twilight Princess save games (if any). For that, we format the SD card (it needs a FAT16/FAT32) filesystem.
 $ mkfs.vfat /dev/mmcblk0p1 (you may need to change "mmcblk0p1" to whatever fits your setup)
Now insert the SD card into the Wii, start the Wii, go to Wii Options --> Data Management --> Save Data --> Wii and copy your Twilight Princess save games onto the SD card. Then, poweroff, remove the SD card, insert it into your laptop/PC and copy the save games to a safe place.
 $ mount -t vfat /dev/mmcblk0p1 /mnt
 $ mv /mnt/private ~/zelda_savegames
Twilight Hack and Homebrew Channel The Legend of Zelda: Twilight Princess Next up: download the Twilight Hack and Homebrew Channel, and put the files on the SD card:
 $ wget http://hbc.hackmii.com/dist/twilight-hack-v0.1-beta1.zip
 $ unzip twilight-hack-v0.1-beta1.zip
 $ cp -r private /mnt
 $ wget http://hbc.hackmii.com/dist/the_homebrew_channel-1.0.1.tar.gz
 $ tar xfvz the_homebrew_channel-1.0.1.tar.gz
 $ cp the_homebrew_channel-1.0.1/boot.dol /mnt
 $ umount /mnt
Now remove the SD card, insert it into the Wii and power-up the Wii. Go to Wii Options --> Data Management --> Save Data --> Wii, delete the Wii Twilight Princess save games, then copy the "Twilight Hack" save game from the SD card onto the Wii (you need to select the correct one for your region). Quit the menu, start Twilight Princess, load the "Twilight Hack" savegame and finally talk to the person in front of you (do not perform any other actions, or the Wii may crash!). Follow the remaining instructions on the screen and you're done. You now have an additional channel named Homebrew Channel where all your homebrew programs/games (and your own Free Software programs you may write/port) will appear. Installing homebrew software So far, there are no real applications in the Homebrew Channel, you need to put all the homebrew software you want on the SD card. There's a huuuge list of applications and games to choose from, many of them Free Software with source code, some however are binary-only. Basically, you put each application in a sub-directory of apps/ on the SD card, the most important file in every sub-directory is always boot.dol. If you have a boot.elf file instead, you'll probably need to convert it using the ELF to DOL converter. Restoring Twilight Princess save games You may now want to restore your Twilight Princess save games onto the Wii, you no longer need the "Twilight Hack" save game. Put your ~/zelda_savegames directory on the SD card and name it private/ again. Insert the SD card into the Wii and copy the save games on the Wii (similar procedure as above). Have fun with homebrew software on your Wii, or even better write your own software or port existing Linux applications/games!

4 January 2009

Andrew Pollock: [tech] Mixing electricity and water: monitoring the cat water bowl with Nagios

(this is something I've had "in production" for many months now, I just haven't had the time or energy to do a proper write up about what I did) We have a cat water bowl, it looks like this: The cat water bowl Under "normal" circumstances, it usually lasts about seven days. So when our weekly routine is happening, we'll refill it on a Saturday whilst doing house chores, and it'll last until the following Saturday when it gets refilled. Unfortunately, sometimes our routine gets disrupted, and we forget. Sometimes, we travel and have a house-sitter, who may not pay as close attention to such things as ourselves. Once, one of our cats was licking the condensation off a chilled bottle of soft drink that was on the kitchen counter one evening, before we realised the water bowl needed refilling. Naturally, we felt like terrible pet owners. So I think it was some time around the 2008 Maker Faire, that I hatched the idea of having some sort of water sensor on the cat bowl, which would communicate to one of the various computers in house. At the Maker Faire, I bought a copy of Making things talk, and an Arduino starter kit, which consisted of a Diecimila board and a make-it-yourself proto shield. I also bought a little electronics starter kit, which consisted of a breadboard and various components, and a USB-TTL cable. I decided to use Bluetooth to communicate with the board, as I already had my MythTV setup using a Bluetooth keyboard and mouse, and it was within range of the water bowl. I decided against using Zigbee, because I didn't know anything about it, and I didn't want to add (or learn about) yet another wireless infrastructure just for this project. I should point out that I know very little about electronics. I'd never owned (or really used) a soldering iron until I embarked on this project. I took a basic soldering class at the Tech Shop, but I'd already assembled the proto shield by the time I took the class, so I'd pretty much figured it out. I had a very naive vision that I could just basically shove two wires in some water and it'd close a circuit and that would be my water sensor. Of course this didn't work, so I started hunting around on the Internet for a circuit that would do this. I happened upon a circuit (I don't seem to have retained the URL, so I can't link to it), which just consisted of a couple of transistors and some resistors. So I headed off to Fry's to try and buy the transistors I needed. I quickly discovered that I didn't have sufficient information to identify the transistors that I wanted, but I did happen to stumble upon a cheap assemble-it-yourself water alarm. It consisted of a PCB, and a transistor and some resistors and a buzzer. I bought a couple of these instead. Between studying the PCB and the circuit diagram that came with the alarm, I was able to reproduce it on my breadboard instead of on the PCB. Sure enough, placing the two probes in water closed the circuit. I replaced the buzzer with an LED so I could see what was going on. I attached the circuit to the Arduino proto shield, and had it feed into one of the digital I/O ports. I wrote some quick and dirty Wiring code so that when water not present (i.e. the circuit was open and no current was detected on that I/O port) the LED was switched on. Really at this point, I didn't need a microcontroller, I could have presumably achieved the same thing with a NOT gate. At this point, I wanted to make the sensor remotely queryable. I bought a BlueSMiRF Silver Bluetooth modem, which I attached to the TX and RX lines of the board (I first configured it by attaching the USB-TTL cable to it and using Minicom on my laptop). I extended the Wiring code to provide a rudimentary prompt, and accept a command to check if water was present. I think around this time it also dawned on me that I could use the digital I/O pins as a switch. When they're "high" they provide power. So rather than constantly running a current through the water, I only needed to briefly power up the water detection circuit, see if the circuit closed or not, and then report if water was present if it did. I much preferred this, as at the time, I was endeavouring to power the whole sensor off a 9 volt battery. I figured I'd get much better battery life if I wasn't running a current through the water the entire time. I should point out that I did some "tongue tests" in a glass of water while the circuit was powered up, and couldn't detect a difference between when the circuit was on or off. The last thing I wanted to be doing was zapping the cats! At this point, the Wiring and Arduino work was pretty much complete. I setup ser2net on the MythTV server, so that I could just connect to port 4000, and be connected to the water sensor.
apollock@icarus:~$ telnet teevee 4000
Trying 172.16.0.9...
Connected to teevee.andrew.net.au.
Escape character is '^]'.
ser2net port 4000 device /dev/rfcomm0 [9600 N81] (Debian GNU/Linux)
waterbowl> s
Water is present
waterbowl>
telnet> q
Connection closed.
apollock@icarus:~$
The Wiring code running on the Arduino board is checked in here. Next, I wanted to monitor this with Nagios. One thing I found with the Bluetooth connection was that it wasn't all that reliable. Not every connection to port 4000 resulted in a connection with the water sensor. I elected to write some standalone code that submitted results to Nagios by way of a passive check, rather than having Nagios try to actively monitor it. Again, trying to conserve energy, I decided to only check the sensor once every 8 hours. So I wrote a Python daemon, which tried to be as robust as possible. If at first it doesn't make a connection on its 8 hourly schedule, it keeps trying until it does. Nagios itself has some freshness detection for this monitor, so if no passive result is submitted within 8 hours and one minute, Nagios alerts that something is possibly wrong with the sensor itself. (The original intent was to deal with the situation where the battery went flat) This is the Nagios service definition I've got. Some of it may be unnecessary or redundant:
define service  
        host_name                       teevee
        service_description             Cat water bowl
        check_command                   check_stale!2!"Check water bowl monitor is on and reachable"
        normal_check_interval           480
        notification_interval           240
        active_checks_enabled           0
        check_freshness                 1
        freshness_threshold             28860
        max_check_attempts              1
        check_period                    24x7
        use                             generic-service
        stalking_options                o,w,c
        contact_groups                  everyone
 
The code for the Python daemon is checked in here. So everything was going swimmingly, apart from I couldn't get even 24 hours of monitoring on my conservative 3 times a day schedule, and the Bluetooth modem configured for all of its power saving options, and the water sensor itself only being powered on when it was performing a check. There wasn't much more I could do to try and reduce power consumption, at least with my limited electronics knowledge. Perhaps using Zigbee instead of Bluetooth would have helped, but I still think I'd have been going through 9 volt batteries more quickly than I'd have liked. I also had a brief foray into solar powering the board. I thought maybe the lighting in the house would be sufficient to power the board. Of course this didn't work out. I'd also have needed to make the code running on the board more self-sufficient, and have it just provide a water status indication whenever it had enough power to do so, instead of being a fairly dumb device like it currently is. This all felt a whole level more complicated, and out of my league, and I wasn't interested in attempting this sort of remote-sensing exercise at this time. The Arduino board can also be powered by USB, so as I already had some long USB type A to type B cables (that had funky lights in them to boot), I decided to just get a wall wart that had a USB type A receptacle, and powered the Arduino board that way. So much for being completely "wireless". (I could have also gotten a general purpose DC power supply that was capable of spitting out 9 volts, but I doubted I'd get one with a sufficiently long cable, which is why I went for the USB-powered option, as I already had a cable long enough) Speaking of wires, the most challenging part was the probes for the water sensor. As they were going to be permanently in the cats' drinking water, I didn't want to contaminate the water with them. I figured plain untinned copper wire would be okay, since water pipes are copper. Finding untinned, unstranded copper wire was a real challenge. I started out using some FM antenna cable, but that was stranded, and the shielding was a nightmare to strip. It was also reasonably difficult to make go where I wanted it. What I really wanted was something more solid, that would flex and stay where I put it. I cannibalised a spare IEC power cable, but it was also stranded copper wire. I finally managed to obtain some solid-core CAT-5 cable from a hardware store, and this has worked exactly as I wanted. I haven't done any further work on the setup since getting the CAT-5 cable for the probe. Further improvements that I'd like to do at some point: The finished product I had a lot of fun with this project. I had a real sense of achievement, being able to go from concept to completion, and learn a few things about electronics along the way. I'm normally not a fan of messing around with hardware. Some photos of the project are here.

3 January 2009

John Goerzen: Garmin Nuvi 500

I ve owned two different GPSs in the past: a Garmin GPS III, and the Garmin eMap. Both are based on similar underlying firmware. This week, I did some research on more modern GPS units and decided to buy a Garmin nuvi 500. Here s my review. Overview The Garmin nuvi 500 is one of only two models in the nuvi line that are waterproof. The nuvi 500 and 550 are both designed as hybrid units: useful both in the car and outdoors. The 500 includes street-level maps (they appear to be the same quality as Google) for the entire United States, detailed topographical maps for the entire United States, and a global basemap. It also includes a microSD slot (or is it miniSD - I forget) for additional maps that you can buy anything from marine maps to other countries. It also includes a default POI (points of interest) database containing over 5 million points: restaurants, gas stations, parks, hospitals, you name it. Most contain an address and a phone number in additional to the coordinates. Unlike GPS units that you find built in to some cell phones, this is all stored on flash memory on the unit: no Internet connection required. The nuvi 500 is a portable yellow pages, topographical map, and incredibly detailed street atlas all in one. Car Use The nuvi 500 comes with a car charger and suction cup windshield mount in the box. (It doesn t come with an AC charger, but it can charge over USB.) It also comes with yay a user-replaceable battery. The windshield mount is very sturdy and I am happy to have one that isn t permanent. In the car, the device performs admirably. I have read some other reviewers that have compared its routing to other GPSs and found that the nuvi generally picks the same route as Google, and almost always a better route than other GPSs. If you deviate from the selected route, it automatically re-calculates a new route for you. It will show you the next turn coming up, and has either 3D or flat map displays. There s a one-touch where am I feature. It displays your current coordinates, some sort of street address suitable to read to someone ( 1234 S. Main or I-95 exit 43 type of thing), along with buttons to show you the nearest police stations and hospitals. The unit also features multi-stop routing. You can either tell it where all you re going in a defined order, or tell it all your stops and let it create an optimal route. This feature works, but it your stops are close by (and involve some of the same roads), it may wind up skipping some stops thinking you ve made your first one. The speaker announces upcoming maneuvers, though it doesn t have a synthesizer for street names. It s also supposed to work with Bluetooth headsets, though I haven t tested that feature. I found the map quality to be excellent. It seems to be on par with Google (in fact, I think both use data from Navteq). I was surprised with how many country dirt roads and side roads it knows about and of course, regular city streets are all on there, with one-way indications and the whole lot. In fact, the quality of coverage was so good that I was surprised when it missed roads or got things wrong. Out in rural areas, or small towns, this happens from time to time: it thought that an abandoned railbed was an unnamed road and wanted me to drive on it (it was clearly not drivable), and in some other cases also thought some abandoned roads were still drivable. I don t think this is a device issue though; it s an underlying data issue, and everyone else probably has the same problem. Its arrival time estimates are quite accurate, and its interface is smooth and easy. It has some optional accessories I haven t tried, such as real-time traffic reports from wireless sources, boating mode, etc. Outdoor and Geocaching Mode Our other main use for the device is outdoor hiking and geocaching. It really shines here. It has special support for the GPX files from geocaching.com. The device supports paperless caching . Not only can it put caches on the map, but if you download the GPX file for your caches, you ll also get the full description, hint (behind a separate button, of course), most recent 5 logs, and the like right there on your screen. You can also log your finds on the device, and upload a file from it to geocaching.com later to log them on the site. This is an incredible time saver over my old method: printing out a bunch of maps, downloading waypoints to the eMap, taking notes, then logging things later. I found outdoor mode not quite as refined as the auto mode, however. It kept forgetting that I wanted to use an arrow as my current position indicator (the default hiking boots for walking mode didn t provide an accurate enough direction indication for my tastes). Finally realized that saying don t ask me about the configuration was the key to getting it to remember the configuration. It sometimes took a surprisingly long time to realize we weren t standing still any longer. On the other hand, the quality of the GPS receiver was amazing. It even got a strong signal in my house. And I wasn t even sitting at a window. The topographical maps are a nice addition, and the breadcrumb mode is always helpful when geocaching and hiking, too. My natural way of holding it meant that I accidentally turned it off a few times, because I had a finger holding it right over the power button. But it powers back up and re-obtains the signal quite rapidly. The different modes (automobile, outdoor, bicycle, and scooter) are mainly different collections of settings: 3D map or flat, what indicator to use, to navigate off-road or along roadways, to ignore one-way indications or heed them, etc. PC link The nuvi 500 has a USB port. Plug it into the PC, and you see its internal flash drive, vfat formatted. You can upload and download GPX files there, store photos if you like. Be careful what you mess with though, because its built-in maps and system data are also on that drive. If you have the SD card inserted, that will also be presented to your computer when you plug the device in. Garmin has some Windows software to make it easier to upload/download stuff, but I haven t tried it. Annoyances As you can tell, I really like this GPS, but there are a few things about it that annoy me. The #1 thing that annoys me isn t actually the GPS itself, but Garmin s website. I went to register the device online, but it wouldn t let me because I don t have the Windows-only browser plugin on my Linux machine, and it wanted to talk to the GPS for some reason. I went to send them a support request about that, only to discover after I had typed in the request that their email us form is broken in Firefox on all platforms. Bad show, Garmin. The on-screen keyboard (it s a touch-screen device with only one hard button for power) isn t QWERTY layout; it s alphabetical layout, and it makes me inefficient when entering data. I found myself logging my finds on the unit, but taking notes about them on paper because that was faster. Garmin has a feature listed on their website for a toggle between QWERTY and alphabetical layout, which they apparently offer on only their more expensive GPSs. What? There is no reason to not but that in all your firmware. The device lacks a few features I was used to on my GPS III and eMap. It doesn t support any kind of real-time position indication to the PC; all communications is just accessing stored data on the internal flash drive. I used to think that was a nice feature, but in reality, I haven t used it in years. It also lacks the display of the exact location of each GPS satellite, though the incredible quality of its receiver means that I don t really care any more. (I used to use that information to help figure out which window to put it by if in a car/train or something.) It also lacks the level of configuration that was present in the settings screens on the older units. There s no battery saver mode (sample every 5 seconds when going at a constant velocity instead of every 1) like the older units had. The sun and moon screen likewise is gone, but added is awareness of timezones; the Nuvi 500 can show you the local time at your present position synced up with the GPS satellites. The compass is not the most helpful screen, though after some practice, it is functional. The documentation about it is confusing, but really the thing that was more confusing was this: in walking mode, the arrow that indicates what direction you re walking in updates faster than the arrow that indicates what direction you should be walking in. Once I realized what was going on there, it was easier to use. The compass does tell you what your bearing is, in degrees, but only when you are not seeking a destination. It will not tell you the bearing to the destination, though you can estimate it from the simulated compass face on the display. When seeking a specific point, especially through terrain with obstacles such as trees, it is useful to be able to use a compass for the final approach because a GPS unit can t tell you which direction it s pointed only which direction it s moving, so when you re not moving or moving slowly, it s not helpful. I did some experimentation today with the compass screen, as well as my real compass, and was able to navigate to my destination rather precisely using the combination of them. That said, a more functional compass screen would still be better. Conclusion Overall, I m very happy with the nuvi 500. It s not the same as a top-of-the-line device in either the outdoor or automotive category, but on the other hand, it s cheaper and more convenient than buying two devices with similar features. The geocaching features are excellent, the build quality is excellent as well. The system is stable and performs well. (Some other reviews worried about whether the case is solid enough; it seems quite solid to me.) I wish there were a faster way to toggle between 3D and flat map views, and forgetting about my walking mode icon is annoying, but other than that I have very little to complain about. Garmin s geocaching features (found on this unit and several other in their lineup) is great.

2 January 2009

John Goerzen: Kansas Adventure

Today, Terah and I set out for some geocaching. Jacob s daycare was back in session (he goes twice a week), but we both had the day off. Jacob enjoys geocaching, but he does make it a lot slower. So we dropped him off at day care today, and headed off. We were also scouting out good places for future tent camping along the way. We didn t know exactly where we d manage to go, so I had downloaded over 100 geocaches to my new GPS, prepared for many options! Not long after we found our second cache (in Canton, KS), Terah asked, Did you hear that hissing from the tire? No . We were about 5 miles from town. I happened to have an air tank with me (because of a different tire with a slow leak). I shot some air in it, and we made it to Canton Service just fine. They fixed both tires, and my uncle who was there getting tire work done himself was quite surprised to see us pull in bright and early at about 9:00! After our tire was fixed, we headed northeast. We found some more caches, and drove around the two lakes near Herington, KS. We saw hundreds of geese perched on the icy lake and hiked a bit in the area to find a cache. Then it was on to Council Grove for lunch. I do believe this is the first time we have ever walked into a place that looks like a restaurant and only after we are seated realize that we re in a museum. Council Grove has an amazing historic downtown the most history per capita of any town in the west! the travel information AM station proudly proclaims, with 25 historic sites and a population of 2500. Got a chuckle at that one. We drove by the oldest continuously operating restaurant west of the Mississippi (it was closed), so we turned around and stopped at the Trail Days Bakery and Cafe that we had passed a few blocks back. We walked in the side door, into what looked like a meticulously-restored old house. We were seated at a table, given menus, and the waiter explained, By the way, you re eating in a cafe that s also a museum. Please feel free to look around, and don t miss the basement and upstairs, too! So it turned out that the Trail Days Bakery and Cafe is in the historic Terwilliger House. The house was about to be razed, when Shirley and Ken McClintock heard about it and tried to get some people interested in saving it. When nobody else stepped up, they did they formed a non-profit, and with a lot of hard work from themselves and others, managed to restore it from its state as a run-down gas station to its former beauty. They operate the cafe as a way to raise funds for the preservation of the house and the other historic buildings they have moved to the site to restore. Oh, and Shirley and Ken were our cooks and waiters today! We showed up there at about 1PM, right at the tail end of the lunch rush. Another couple happened to be there at about the same time. They were traveling across Kansas from west to east, specifically avoiding the interstates so they could see the small towns along the way. We got to talking about geocaching and their home town near Colorado. Then we got to talking to Shirley about the music CDs that they had for sale and the history of the place, and the Ken told us all about the Native American pictograph that they had discovered carved into the wood in the house. By the time we left, we had probably been there almost two hours. Oh, by the way, Terah had ham and beans ( just like mom used to make , she said), and I had what can be best described as a sloppy joe made out of bison meat. Both were good, but eating in this beautiful old house was even nicer. Then we drove down the road a bit to the old apothecary. Yes, it s still a drugstore in every sense of the word: you can get your prescriptions filled there, and they also still have the original soda fountain (dating back to 1920 if memory serves), serving up all the stuff you used to find in a drugstore. We chose somewhat boring items, I guess: Terah had a chocolate shake (the made-in-front-of-you-fresh kind), and I had a root beer float. So, what would have been a quick lunch in a different town turned into a few hours in Council Grove thanks to a very helpful leaky tire this morning that threw us off schedule! After that, a few more caches on the way back towards home. We picked up Jacob, and he and I found the last cache of the day which he, of course, loved. Then home. We only found 8 caches, but had a lot of fun.

Joey Hess: new year

I'm trying to work on having days that are somehow individually memorable this year. So far.. 0 (leap day) Finally tackled the chapter on monads. I'd read various explanations a year ago, but was swimming in syntax I didn't understand. After percolating for a year, and learning to read the syntax better, monads turned out to make very simple sense. (I can't say the same about Johnny Monad.) I had been meaning to write sometime about a method I used in ikiwiki to let expressions in a mini-language, that normally are evaluated to match a set of pages, instead be evaluated to explain why they succeed or fail. It's a cute technique, though hard to explain. Now I'm pretty sure it's just a monad. So I don't have to explain it! 1 Visiting Abram's falls this time of year, the canyon is in constant wintry shadow. The falls are not frozen, but have icicles twice my height, and there are rank upon rank of icicles all down the walls, an ice cathederal. It's a bright sunny day, but on the whole hike, I only get into the sunlight once, briefly, at the top of the giant steps. Then back into the shade. Back at my car, I'm suprised that it's only 3 pm, feels like it should be 5. Made a pecan pie with daddy's pecans and eggs. 2 A grey day with snow and worse. The paper's rss feed repeats "dozens^Whundreds of wrecks" over and over, as if to make up for there being no 60 point type. I'm reading Ted Nelson's book Geeks Bearing Gifts. The chapter summaries seem better than the actual book. And the on-demand printing makes me think I'm reading a poorly laid out web page, rather than something typeset. But I love that he goes all the way back to the invention of the alphabet and of hierarchical categorization and suggests all the basis for modern computers is arbitrary and/or wrong. Eating ginger duck downtown I look up and a pizza delivery guy has slid out of control right in front of me and crashed.

Wouter Verhelst: Dependency graphs

Andrew blogs about this nice Debian Dependency graph generator over at gnowledge.org. It nicely shows why I'm not entirely fond of the belgian electronic ID software: just have a look at the dependency graph for libbeidlibopensc2. Seriously.

David Welton: Twitter? Hrm. Ok...

Yoav's post about twitter was interesting: http://yoavs.blogspot.com/2009/01/one-curious-thing-about-twitter.html Personally, I don't really see the appeal. So far there are only two uses I have for it:
  • Lance Armstrong writes a fair bit, and even posts some pictures, and since I am a huge cycling fan, that's kind of fun to read.
  • I use the search API to keep track of people talking about my stuff... Hecl, LangPop.com, and so on. That's kind of handy, but it feels more like a big wiretap than a "conversation".
Other than that, it's another firehose of data that I really don't need - I probably read too much junk on the internet as it is.

Next.

Previous.