July 30, 2010

Paul Hummer : Source Package Recipes: Are They More Addictive Than Crack Cocaine?

Yes. Yes they are.

I'm crap at packaging. My mind has never really grokked all the packaging things. Also, I make packages, and then they quickly get out of date as I continue to work on the upstream part, and so then there's this big hill to get over when I actually need to package it again.

Enter source package recipes. It's what Aaron Bentley and I have been working on for the past 6 months. Basically, take two bzr branches, put them together using a recipe, and make a source package (and eventually a binary package) out of them.

My first recipe got built into a binary package two days ago, but I just noticed it.

Now I want to package everything.



Paul Hummer : Dear Ubuntu Community - Thank You

I plug my new gadgets in. They work out of the box.

I want to install and play with a new piece of software. I don't have to search the net for that software.

I want to write new code. I'm up and running pretty quickly.

I want to buy new music and put it on my music player. I can certainly do that.

I want to contribute back to my OS. Kind people help me do that.

I just wanted to take a minute and say thank you to everyone that works on Ubuntu, from helping new users to writing code to testing code and filing bugs. You make me forget about my OS enough to get my work done. Thank you.



July 20, 2010

Kyle Anderson : The Seagate Dockstar: A Very Cool Linux Device

What if I told you there was a computer out there, a small one, with gigabit ethernet, 4 USB 2.0 ports, runs on 5 watts, and serves as a great NAS (network attached storage) for your home.  It can share files, serve media, be a router, make backups for you, host a lamp stack, be a mail server, etc. It can do whatever you can think up.

How much would you pay for such a neat little device? $100? $120? What if I told you that this device is ~$35. What a deal. Lose your P4 electricity guzzler and stick this on your shelf with some harddrives plugged into it.

Now the next question, what Linux distro should we use, and how does one go about installing it? After all, there is no keyboard ports, no display, no cdrom drive. No problem.

To hack this thing, all you need to do is connect to its internal serial port. Here are some instructions to hook up a serial port to the Seagate Dockstar.

Now, there are lots of distros, not too many that support the ARM processor. The stock OS is indeed Ubuntu 9.04, however my OS of choice for this hardware is OpenWRT. Openwrt is a very light, simple, linux distro, designed for embedded systems and routers.  If you wish to follow my steps, here are some instructions on installing Openwrt on a Dockstar. I plan to buy a bunch of these and build some sort of super cheap SAN. I’ll let you know where it goes. The possibilities are only bounded by your imagination. (And I guess maybe the hardware)



July 18, 2010

Paul Hummer : Tarmac 0.3 Released (and then 0.3.1 shortly after)

I was entirely happy to happy to announce a new version of Tarmac, 0.3. In fact, I was so happy that I went again and immediately did another release of Tarmac, Tarmac 0.3.1. Tarmac 0.3.x series brings a whole slew of fixes, including fixing more than half of the bugs filed against Tarmac. In fact, there are no more bugs with a higher importance than Low currently (ideally, people use the software and find more for me to work on).

Tarmac is a tool for automatically landing branches that have been approved for merge through the Launchpad code review system. It uses the Launchpad API to find these branches, and has a variety of features to automate their merge and management.

Tarmac 0.3 is also a complete re-write of most of the system. Notably, this means that Tarmac can be used on branches that aren't the development focus. I'm sure this will make Ted Gould happy, but the real reason I did this was help in the managing of all those official source package branches on Launchpad.

The Plugin architecture has also been reworked a bit as well. Since I spent so much time writing documentation for Tarmac, I realized how icky it was to write plugins. If you have plugins from 0.2, you'll need to port them to 0.3. You'll also need to port your configuration to Tarmac 0.3.x, since the configuration has changed a bit.

The final big thing to notice is that Tarmac is getting entirely more entwined with bzrlib (because it's such an awesome library even outside of bzr) by stealing it's command code. Tarmac is only one script now, and the first argument is the actual command.

You can find Tarmac 0.3.1 here. I'm working on packaging it now (although I'm really slow packaging, mentoring desired).



July 16, 2010

Kyle Anderson : Setting Up Your Very Own PXE Server!

Ever fumbled around your house looking for a Linux CD, but you can’t find it? Ever suspected that your ram was going bad, but you didn’t have a way to test it? Ever needed to backup files on a computer that had a dead and broken operating system? A solution to all these problems is a super cool tool called PXE booting. PXE booting allows you to load alternative operating systems over the network, without the need for cds, cdroms, etc!

Things you can do with a PXE server

Things you can do with a PXE server

Sound like something that you could benefit from? Setting up your own PXE boot environment is easy and Fun! Check out my presentation and then later my wiki page for notes, commands, and configuration snippets to get your own setup going.



Tummy.com Blogs : Setting up a PXE boot Server

From: Kyle Anderson

Ever fumbled around your house looking for a Linux CD, but you can't find it? Ever suspected that your ram was going bad, but you didn't have a way to test it? Ever needed to backup files on a computer that had a dead and broken operating system? A solution to all these problems is a super cool tool called PXE booting. PXE booting allows you to load alternative operating systems over the network, without the need for cds, cdroms, etc!

Sound like something that you could benefit from? Setting up your own PXE boot environment is easy and Fun! Check out my Journal entry and then later my wiki page for notes, commands, and configuration snippets to get your own setup going.


July 02, 2010

Darrin Goodman : Installing Amazon’s MP3 Downloader on Ubuntu 10.04 and Debian Squeeze

Because Amazon.com sells music that is DRM-free, and because they offer such a large variety of music, it’s no wonder their music service appeals to so many.  Another thing that might draw people in is that their MP3 Downloader software is not only available for Windows users, but also for Mac and Linux users.  Often times companies who offer various types of electronic services do not offer a Linux version, which can be very frustrating.  The fact that Amazon.com has not forgotten about its Linux users makes me (and most likely others…) quite pleased.

However, at the time of this writing, their current Linux installers are for Ubuntu 9.04, Debian 5, Fedora 11, and OpenSuse 11.1.  For most, if not all of these Linux distributions, their current versions are beyond the version numbers listed above, and (although I can only speak for Ubuntu and Debian at this time) when you go to install the Amazon.com MP3 Downloader software that is associated with your Linux distro, you are likely to run into dependency issues, assuming that your Linux distribution is newer than the version numbers listed above.

In the case of both Ubuntu 10.04 and the current Debian “Squeeze”, when installing the Amazon software, instead of using current libraries for libboost v.1.40.0, dependency issues were flagged as errors, and libboost v.1.34.1 library files needed to be installed.  It turns out that there are seven of them.

Download the dependencies

Although the 7 dependencies that I have herded together came from the packages.ubuntu.com/karmic/ website, I tested them successfully on both Ubuntu 10.04 and Debian Squeeze.  Download the dependencies here. Please note that all of these dependencies are for x86 systems.  Incidentally, Amazon.com’s MP3 Downloader software is only packaged for 32 bit systems at this time.

Installation Procedure

Open a terminal session, navigate to the tarball  that you downloaded from the link above, and unpack the file:

$ tar -xvzf AmazonMP3-InstallerForUbuntuNewerThan-9.04.tar.gz

Using your file manager, open up the new directory called AmazonMP3-InstallerForUbuntuNewerThan-9.04.  Inside, you will find a README.txt file that contains a bit of helpful information.  I would imagine that there is a way that all of these .deb files could be packaged into one installable .deb file (so that you would not have to walk through seven different installations), but I’m not quite sure how that works yet (although I’d love to learn).  If anyone has any advice on this, please feel free to contact me or post in the comments for everyone’s benefit.

The .deb files are listed in order, starting with #01 and ending with #07.  Right click on the first one in the list, select “Open with GDebi Package Installer” and walk through the installation process.  Repeat this process until you’ve installed all seven of the dependencies.

Download / Install Amazon MP3 Downloader

To install the Amazon.com MP3 Downloader software, go to the link below and download either the Ubuntu or Debian versions, depending on which system you are running.
http://www.amazon.com/gp/dmusic/help/amd.html/ref=sv_dmusic_5
Save the file to your hard drive (perhaps in the same location where all of the .deb files are that you have just installed…).  Then navigate to this file and install it using the GDebi installation procedure described in the paragraph above.

How to Use the MP3 Downloader Software

To use the MP3 Downloader software, navigate to Amazon.com’s website, login to your Amazon account, locate digital music that you wish to download, then select either the “Buy MP3″ button to download one song, or the “Buy MP3 album with 1-Click” button to download the album.

Assuming that your credit card information is already stored in your personal Amazon account, you’ll be able to walk through this procedure fairly easily.  Once you have clicked one of the Buy buttons, you will be given a chance to either cancel or proceed with the purchase.

Click Cancel to cancel the purchase, or to continue, click the Continue button.  Assuming that you continue with the purchase, you will will be prompted to either download or open the .amz file.  Select Open With Amazon MP3 Downloader.

Your Amazon MP3 Downloader should then open up and display the download progress.

Once the download has completed, you will be notified.  Notice in the above screenshot image that there is a button to “View Download Directory”.  In Ubuntu 10.04, his will take you to your ~/Music/Amazon MP3 directory.  In the latest CrunchBang Statler10 Alpha2 version (Debian Squeeze with Openbox), your files will be stored under ~/Amazon MP3.

Here’s the screenshot from CrunchBang Statler10 Alpha2:

In Conclusion

As an individual who likes to support local businesses as much as possible, my intent in this article is not to endorse a monster media conglomerate such as Amazon.com, but when it comes to downloading DRM-free music from a Linux-friendly source that offers a wide selection of music that I like, I’ve been highly pleased with Amazon’s MP3 Downloader service.

Hopefully, Amazon.com will soon come out with newer versions of the MP3 Downloader software for Linux (so that we don’t have to jump through all of the hoops listed above…), and hopefully they will also continue to link to old versions of the software for those who choose to run older Linux distributions.



June 30, 2010

Kevin Fenzi : accentuate the positive

There has been a fair bit of discussion in the past in the Fedora community about how to deal with people who are projecting a community that some don’t find welcoming enough or are sending out negative energy (especially to newcomers) or are just creating a community thats not pleasant to be working in. Many of these discussions have talked about things like:

  • more rules to specifically ban or censure the behavior
  • removal of privileged or access for people “blamed” for something.
  • enforcing existing rules in a more rigid manner, banning people, moderating them or removing them from feeds.
  • establishing some kind of community committee to do all of the above

I would like to suggest another (hopefully better) way forward: Respond to negative energy with positive wherever possible.

Some examples:

  • A negative reply to someone on a mailing list: Reply to the orig poster with the positive answer you would have liked to have seen.
  • A poorly phrased, rude or condescending IRC reply to a question: Reply to the orig poster with the better, positive answer you would liked to have seen.
  • A post on the planet feed you find offensive, in poor taste or disagree with: Post your own blog post with a positive reply. How could this have been better? Whats something related that’s good?
  • A bugzilla bug with a rude or curt or bad reply on it. Add a comment with the correct answer phrased in a nice positive way.

Do I think this will solve all issues with negative people? No. But think about it: If someone is unwelcoming to a newcomer and your first reaction is to try and blame or punsh the unwelcoming community member, what is the newcomer to think? How about if you instead focus on being positive and helping the newcomer. I think you’ll find that in the first case the newcomer will leave in disgust that the community is so flamefilled, and in the second they will rightly realize the unwelcoming person is a outlyer and should be ignored.

How about giving it a try today? Instead of flaming, looking for someone to blame for something, or coming up with new rules you just simply lead by positive example?



June 22, 2010

Core Software Group : Injecting Plone variables into javascript

 

Step 1: Create a class to output the javascript

I created a file in src/my.product/my/product/browser called CommonUtils.py and added a class GlobalJS with a __call__ method that returns a string containing the javascript. __call__ sets the content-type, creates the string containing the variable, and returns the string.

class GlobalJS(BrowserView):
 
    def __call__(self,REQUEST,RESPONSE):
        RESPONSE.setHeader('Content-Type', 'application/javascript')
        js_string = "var portal_url = '%s';" % (self.context.portal_url())
        return js_string

 

Step 2: Create a browser view pointing to the class

In src/my.product/my/product/browser/configure.zcml, I added a browser view pointing to GlobalJS, gave it a name, and added a permission. Note that the name of the file containing GlobalJS is CommonUtils.py

<browser:view 
     for="*"
     name="global_js.js" 
     class=".CommonUtils.GlobalJS"
     permission="zope2.View"
     />

 

Step 3: Register the view in javascript registry

Here, I register the browser view in src/my.product/my/product/profiles/default/jsregistry.xml. I needed access to portal_url before jquery was loaded, so I added the insert-before property. Note that the id is the same as the name registered in the browser view.

<javascript 
    id="global_js.js"
    cacheable="True" compression="safe" cookable="True"
    enabled="True" expression=""  inline="True" insert-before="jquery.js"/>

 

Now, global_js.js is loaded on every page and I have access to portal_url from within javascript.

Hope this helps someone.



Paul Hummer : If You Can't Open It, You Don't Own It - My Talk at Ignite Fort Collins 5

Last week, I gave a talk entitled "If You Can't Open It, You Don't Own It" I thought the contents of the talk would go well on this blog, and I so wanted another opportunity to self promote (or something).



June 20, 2010

Tummy.com Blogs : Competing teams and HP BASIC.

From: Sean Reifschneider

Slashdot has a story about using competing development teams to find the best solution. This reminded me of the HP-BASIC or "Rocky Mountain Basic" project.

The story I heard, in the late '80s when I was working on testing in the Loveland Instrument Division of HP on their port of RMB to Unix, was that HP was looking to create a BASIC variant, and they set up two teams, one in Colorado and one on the east coast. These variants were Rocky Mountain Basic and East Coast Basic.

The developers were given some time to work on their visions, and then presentations were set up to allow a choice between them to be made. Once released, RMB was generally considered to be a pretty great dialect. I programmed in RMB early on, while I was also learning Pascal, and found that RMB was much less panful than the other BASICs I had dealt with, like Microsoft's.

I also remember a meeting where our manager asked a bunch of us for suggestions on what to call the port to HP-UX, and we were pretty much all in favor of "RMB/UX" or "BASIC/UX". But our manager dropped the bomb "It can't have a slash in it." I remember everyone being pretty annoyed at that. But, in looking at the RMB wikipedia page, it looks like the slash won out in the long run.


June 16, 2010

Jeffrey Haemer : Just in case

I just learned something new about shell syntax -- specifically, about the case statement.

The shell's big enough that I expect I'll be able to keep learning things about it for a long time, even though I've been writing shell scripts for ... lessee ... about 30 years.

Here's today's:

I'm used to writing this:
case $key in
whatever) do-something ;;
*) some-default-behavior ;;
esac
I just read a Fedora system script that looks like this, instead:
case $key in
(whatever) do-something ;;
(*) some-default-behavior ;;
esac
The leading paren is optional, but legal. And not just for bash, but for any POSIX shell. Amazing. Also, the last item doesn't have to have the semis, so it could even be this:
case $key in
(whatever) do-something ;;
(*) some-default-behavior
esac






June 07, 2010

Paul Hummer : Ubuntu, An Arm board, and I Walk Into a Bar...

This post is mostly for me to remember what I was doing when I sit back down to deal with this next weekend. However, since I spent so much time trying to aggregate tons of information from all over the net on how to use these tools, I thought it might make for a good blog post. Also, I'm kind of hoping someone can give me some pointers in making this better.

Earlier this week, I found a purpose for my Beagle Board. Out of my requirements, it satisfied them all, including running Ubuntu. I've been toying with it for a while, and it had Ubuntu on it when I picked it back up this weekend to hack on it. The one thing that I found though was that I wanted a bit more customization than the default Ubuntu install (the keyword here is "wanted").

My ultimate scenario for creating an image is to use Qemu to test my images as I build them, and make sure I have everything available. Testing each image on the actual hardware is a bit time consuming. I want to minimize the size of the image, which means installing only the needed packages, but there are some custom packages I also need to install. Once I had everything set up the way I wanted, I'd create a squashfs partition with my OS and I'd be done.

So this weekend I embarked on the process of making my own Ubuntu image for my Beagle Board. I started off using a tool called rootstock. rootstock makes arm images using debootstrap. It ended up being a huge pain to actually get it working the way I wanted to.

I know debootstrap pretty well, since I do all my Launchpad development in a chroot, and sometimes the Launchpad environment requires me to kill my chroot and start over. Since I was pretty comfortable with it, and I knew it would do exactly what I wanted (and ironically, is used by rootstock), I started down that route. I created a bootstrapped Ubuntu with debootstrap --foreign --arch=armel lucid bootstrap http://ports.ubuntu.com The problem I ran into was that the --foreign part meant that the bootstrap was only the first stage, and I couldn't complete the second stage without ARM hardware or a bootable QEMU ARM instance. Ugh...

After struggling with that (because I'd exhausted all of my knowledge, and the internet is really sparse on my exact needs), I stumbled across an undocumented script called qemu-debootstrap. Documentation is nonexistant, and there's no man page for the script, but qemu-debootstrap --help returns E: I'm just a debootstrap wrapper; please see debootstrap --help. That made sense, but still didn't tell my what it did. Open source is great though, so I just read the source. qemu-debootstrap takes all the debootstrap flags, and adds --foreign, but then also copies in some needed qemu binaries and runs the /debootstrap/debootstrap --second-stage script that completes the debootstrap process.

At this point, my process was this:

  1. dd if=/dev/zero of=arm.img count=2000000 - Create a 2GB(ish) file
  2. mkfs.ext3 arm.img - Format the file to ext3. In the end, I'll use squashfs, but ext3 gives me flexibility for now, and means I don't have to build a custom kernel just yet.
  3. mount -o loop arm.img /mnt - Mount the image at /mnt
  4. qemu-debootstrap --arch=armel lucid /mnt http://ports.ubuntu.com - Here's the good part. Make a filesystem with the basic Ubuntu installation.
  5. umount /mnt - Unmount the image.

The file arm.img is now ready to be booted in qemu. So now I run qemu-system-arm -M versatilepb -cpu cortex-a8 -kernel <kernel-of-my-choice> -hda arm.img -m 256 -append "rootwait root=/dev/sda devtmpfs.mount=0 raid=noautodetect rw".

It boots in Qemu. Hooray! Unfortunately, it seems to crap out after finding the image and trying to run it. udev dies, then plymouth dies, and I get no debugging messages either in the Qemu window, or the pty terminal. I'm still not sure what's going on, but I've at least got something booting now. I'm now digging through the Upstart debugging page, and seeing if I can find out what's going on. Regardless, I have an image that I can now work with. It'll be nice when I can boot it into Gnome, but that's for next weekend, right? :)



June 06, 2010

Tummy.com Blogs : Native ZFS coming to Linux?

From: Sean Reifschneider

A recent thread on the zfs-fuse mailing list has announced that the long-awaited Lustre project to make a native ZFS module for Linux has made good progress. This was announced as being the future for Lustre probably a year ago, but I haven't heard anything about it until this post on the list.

Things are still pretty early it sounds like -- zfs-fuse is likely to be the best choice for probably the next 6 months at least, but it is a significant step toward getting ZFS native under Linux.

The ZFS license is still CDDL, which means that it won't be included in the kernel.org kernel, instead it'll be an out-of-kernel module like DRBD (until recently) or Xen, etc...

This comes at the same time as the ZFS-FUSE 0.6.9 release, which includes deduplication and many other great features. In my testing of 0.6.9b3, it's been working really great. I've been hammering on it with both "zfsstress" and also running it on a test backup server, and it's been running very solidly.

The deduplication has been working well, though you really do need a lot of memory in the ARC cache if you want it to perform well. For this system with 8x2Tb drives, I figure I'll need to put at least 8, and possibly 16GB in the ARC cache. I currently have 8GB RAM, and a 2GB ARC, which is about as much as I can do in an 8GB system. The host will take up to 32GB RAM though, so I have room to grow. My plan is to upgrade it to 8GB and push the ARC up to 8GB, then see how it works. I blew out the original 800MB ARC with deduplication at around 900GB stored in the pool.

It looks like with compression plus deduplication I'm getting a 1.9:1 space savings. Not sure how this compares to the deduplication+compression in BackupPC, but I'm expecting it to do much better simply because I can do block-level changes (large files that just have small appends/updates to them, like databases or log-files).

Anyway, that's the ZFS news for today. :-)


June 02, 2010

Tummy.com Blogs : cron+xargs: The Scheduler of the Stars

From: Sean Reifschneider

I'm working on replacing our BackupPC backup infrastructure (because BackupPC just takes too long), and one of the things I needed to do was schedule backup jobs. In BackupPC you can tell it to run 4 jobs in parallel, and whenever it wakes up if there are slots free and backups to run, it will start some more.

I wanted similar capabilities, but without writing my own scheduler; it's not rocket science, but it's still a complicated bit of code. Ideally, to improve on BackupPC, I'd like to have one job start as soon as another ends, rather than waiting for the next scheduler wake-up.

As I've mentioned before, xargs can manage running multiple jobs. You can specify how many to run in parallel, and it gets the list of arguments to run from stdin. So, what I came up with is a crontab which looks like this:

00 22 * * * echo 1.example.com 2.example.com [...] \
      15.example.com | xargs --max-args=1 --max-procs=4 /path/to/harness
00 09 * * * echo a.example.org b.example.org c.example.org \
      | xargs --max-args=1 --max-procs=1 /path/to/harness

The first line starts at 10pm and runs the harness with the system name to back up as the argument. It runs it for 15 hosts, running 4 in parallel. The second cron entry starts at 9am and runs the 3 example.org backups one at a time (they are hosted off-site and no need to hit their network or ours harder than necessary).

In the past I would manually add the cron entries for each host at specific times, but sometimes jobs would run long and load would go way up, or sometimes there were idle periods where nothing happened... This is definitely an improvement over that, with minimal additional coding.

Wherever possible: Avoid writing code.


May 29, 2010

Tummy.com Blogs : Chromium

From: Kevin Fenzi

I have been using midori full time as my browser for a while now. The latest release of the Chromium browser looked interesting, so I decided to run it for a few days and see how it worked. Read on for a review.

(read more)


May 26, 2010

Jeffrey Haemer : Back Off Man, I'm a Scientist

"I have no faith in anything short of actual measurement & the Rule of Three"
-- Charles Darwin

In an interminable thread about recycling computer parts, on the Boulder Linux Users' Group mailing list, Davide Del Vento injects a completely unsubstantiated and largely dubious claim:
The point of the discussion is what we agree is ok to "kill" or "destroy", and what is not. Is it ok to kill a cow to feed my kids? Most people would say "yes". Is it ok to kill Jeffrey Haemer to feed my kids? Most people would say "no".
Doing science means collecting data. The polls in the left sidebar test his claim.

We shall see, eh?


May 21, 2010

Kevin Fenzi : Fedora 13 IRC release party!

Fedora 13 is just around the corner, coming out this coming tuesday (2010-05-25).

I’d like to invite everyone to join us on irc.freenode.net in #fedora-social for a all day release party!

Come by and say hi and tell us what you think of Fedora 13, how you use Fedora or just share the release day fun with other Fedorians.



May 20, 2010

Kevin Fenzi : back from travels

I’m back from a trip I took out to tacoma to go to a graduation. Sorry for missing out on the first of the Fedora IRC Town Halls. If you are a Fedora contributor, do read the Elections Questionnaire and the logs of the Town hall meetings and remember to go and Vote

Some general notes from my trip:

  • The Droid phone worked very nicely and was quite handy. Being able to get directions, find nearest services, check irc/IM, text house sitters, and play audio were all great. Coverage was very impressive as well
  • Wandering around the coast of oergon was great. I just wish we had more time to visit Fedora folks while we were up there.
  • This American Life is excellent for listening to on long drives. Please support them.
  • South Park Seafood and Grill is an excellent place in Portland. Local, fresh food, great service, yummy desserts.
  • The Van Gogh in the Portland art museum was lovely. It’s really amazing to me how much cooler great paintings are in real life than they are in just pictures of them on the net. The lighting, the texture, the way it looks from different angles and distances all make it well worth going to see these things in real life.
  • Spokane is a interesting city. I had no idea about the falls and such there.

All in all a fun trip, although it’s good to be home. ;) I’ll probibly post pictures here or somewhere soon…



May 19, 2010

Kyle Anderson : ISPs Should Capitalize on their Reverse DNS!

Actually… no they shouldn’t. Here is what it would look like:

                                           My traceroute  [v0.75]
kyle (0.0.0.0)                                                              Tue May 18 15:14:52 2010
Keys:  Help   Display mode   Restart statistics   Order of fields   quit

 Host                                                           Loss%    Snt  Last  Avg  Best  Wrst StDev
 1. 192.168.0.1                                                 0.0%     10   12.0  15.6  11.3  33.6   6.7
 2  UPGRADE-YOUR-CONNECTION-1800-COMCAST.res.comcast.net        0.0%     10   13.1  15.8  11.5  31.1   5.9
 3. TURBOBOOST-UP-TO-50MBS.car1.Den.core.comcast.net            44.4%    10   15.3  17.7  11.8  23.1   4.5
 4. LIKE-WHAT-YOU-SEE?-GET-WITH-LEVEL3!.Level3.net              0.0%     10   27.5  22.5  12.5  43.5   9.0
 5. v----LEVEL3-EATS-SAVVISs-PACKETS.Level3.net                 0.0%     10   43.6  35.9  29.7  43.6   5.7
 6. ^----SUCK-IT-L3.das3-v3037.ch3.savvis.net                   50.0%    10   31.2  32.1  30.8  34.5   1.5
 7. FOR-A-GOOD-PING-TIME-CALL-888-638-6771.dallas3.savvis.net   0.0%     9    28.8  31.8  28.8  43.5   4.8
 8. We-heart-savvis.dllstx0.us.bb.gin.ntt.net                   0.0%     9    30.1  33.1  29.4  51.5   7.0
 9. 4.2.2.2......jk..25.209.2.4                                 0.0%     9    70.3  83.1  68.1 186.6  38.9
10. 0.0.0.zero                                                  0.0%     9    51.6  58.0  51.6  72.9   8.0
11. nothing.here.move.along.                                    0.0%     9    55.4  55.1  51.7  62.1   3.5
12. THIS-SPACE-FOR-RENT!!!                                      0.0%     9    86.3  87.4  83.7  91.3   2.7
13. the-real-site.net                                           0.0%     9    103.9 105.9  84.0 128.2  12.0


May 17, 2010

Kyle Anderson : Stream of Conciousness Youtube Videos on Linux

While sitting watching TV I yearned for a more stream-of-consciousness experience. Youtube was the answer.

However, Youtube requires too much interaction. I wanted to vege out and let it just feed me the stream of random images and sound. Selecting purely random youtube videos sounded like a bad idea though…

I decided to do a twitter search for anything with a youtube link, and then let a script just enqueue them into totem, ad-infinitum. Here is my abomination:

#!/bin/bash
while [ 1 ];
do
 for EACHVIDEO in `wget -O - -q "http://search.twitter.com/search.atom?q=youtube.com" | grep http://www.youtube.com | grep "<content" | sed 's/quot;/\n/g' | grep "http://www.youtube.com" | cut -f 1 -d "&" `
 do
 totem --enqueue `youtube-dl -g -b "$EACHVIDEO" ` &
 sleep  2s
 done
 sleep 30s
done

You need a recent version of the youtube-dl script, located here. Put it in your path as appropriate. Press N for next! Next! Next!

          


May 15, 2010

Tummy.com Blogs : Getting 95 percentile numbers out of rrdtool

From: Sean Reifschneider

This morning I figured out how to get rrdtool to report the 95%ile utilization to stdout. It's kind of convoluted how you do it, you have to use the "graph" subcommand, but write the graph to /dev/null, and use "PRINT" instead of "GPRINT". For example:

eval `$RRDTOOL graph -f '' -s "$1" /dev/null \
   DEF:in="$2":in:AVERAGE \
   DEF:out="$2":out:AVERAGE \
   CDEF:inbits=in,8,* \
   CDEF:outbits=out,8,* \
   VDEF:95pct_in=inbits,95,PERCENT
   VDEF:95pct_out=outbits,95,PERCENT \
   PRINT:95pct_in:"IN='%.2lf %Sb'" \
   PRINT:95pct_out:"OUT='%.2lf %Sb'"

Where "$1" is the period start time (like "-1d" for showing the 95%ile of today), and "$2" is the .rrd file name. I do an "eval" to parse the output (making $IN and $OUT shell variables). The "-f ''" tells is not to write an image size string.

It may also be useful to change the last two lines to use a format something like "IN='%.2lf; IN_MAGNITUDE=%S" (to get something like IN=2.50 and IN_MAGNITUDE=M) or just "IN=%.0lf" (to get the full bits like IN=2500000).

Again, rrdtool proves to be amazingly flexible, given enough time to wrap your mind around it.


May 14, 2010

Jeffrey Haemer : NCAR Software Manufacturing Presentation, the Movie

Courtesy of Davide Del Vento, here's the video in H.264.


May 09, 2010

Tummy.com Blogs : RHEL6 beta and EPEL6 news

From: Kevin Fenzi

Not too long ago, Red Hat released a public Beta of RHEL6 for folks to try out. I've been running it here in a vm since it was released. Read on for my thoughts on the Beta and also News about where EPEL is related to RHEL6.

(read more)


May 01, 2010

Tummy.com Blogs : Python syslog patch to log exceptions

From: Sean Reifschneider

I've just completed a patch to the Python syslog module to add the method enable_exception_logging(). It sets up a sys.excepthook so that unhandled exceptions are logged to syslog. By default, it chains to the existing excepthook.

So, once this code gets accepted, you will be able to have exceptions logged by doing: "import syslog; syslog.enable_exception_logging()".

For Python software that runs from cron or init or Apache, it can be very useful to capture the exceptions in a persistent location.

I'd appreciate some reviews of the code, it's in Issue8214.


April 30, 2010

Darrin Goodman : Making Life Easier With Scripts For Nautilus

In my previous post, I talked about how you can use Nautilus and the nautilus-image-converter as tools for resizing and rotating your images.  Although PCManFM is my preferred file manager, and I often use Thunar if I am bulk renaming files, I keep coming back to Nautilus for file management, network file browsing, image resizing/rotation, and for the ability to use custom scripts that help make life a little bit easier.  It is the latter that I wish to mention here.

Add Music Easily to the MoC Player Using Nautilus

The Nautilus script that I use most frequently is specific to the MoC (Music on Console) music player.  Credit for this one goes to Tyler “-z-” Mulligan. I’ve written in the past about the MoC Player, and of all of the music players that I’ve tried in the past, this one is by far my favorite.  So how does the script work?  Download Tyler’s script and save it in your ~/.gnome2/nautilus-scripts folder.  Change the permissions so that the file is executable.

$ chmod +x mocp.sh

Open up an instance of MoCp (the MoC player), open up Nautilus, and navigate to your music.  You can select individual files or large selections of files, then right click on the file(s), hover over the Scripts item, then select mocp.sh from the list.  This will add the file(s) to your MoCp playlist.  It’s an efficient way of loading music into your player, and is especially nice when you are looking to pick and choose only a song or two from various albums.

Mount and Unmount ISO Images Using Nautilus

Other scripts that I use on occasion are for mounting and unmounting an ISO file. Although there are other methods listed here and here, and likely even more here, I have had good luck with the mount.sh and unmount.sh files that were posted by Lori Kaufman on the Help Desk Geek website.

Save the mount.sh and unmount.sh files to your ~/.gnome2/nautilus-scripts folder, and change the permissions so that the files are executable.

$ chmod +x *.sh

Using Nautilus, navigate to your ISO file, right-click on it, then select “Scripts” from the menu; then select mount.sh to mount the file, or unmount.sh to unmount an already mounted file.

Check out Lori’s article for more screenshots and instructions.

Note to Self: Here are some other Nautilus scripts that I have not yet explored, but will put on the backburner for later.



April 29, 2010

Kevin Fenzi : Fedora IRC Classroom cranking along…

After being quiet for a while, we have cranked the Fedora IRC classroom back up in the last week.

First we had a great class from Joe Brockmeier on How to make life awesome for journalists. I was sadly unable to attend (as I was running the FESCo meeting that was taking place at the same time), but reading the logs it was a great class.

Then tonight I ran another class on How to test Fedora Updates, which I think went reasonably well. If you wondered about how Fedora updates work now and you can provide feedback, how they will look soon, and how they might look someday, please do give the session a read over. ;)

We have a number of other sessions coming up if folks can make them:

  • A Short Tutorial On i18n Through gettext – Naveen Kumar on 30 April, 2010 at 12:30 UTC (6:00 PM IST)
  • Introductory workshop on GNU Autotools – Siddhesh Poyarekar on 03 May, 2010 at 13:30 UTC (7:00 PM IST)
  • Learn about exciting Fedora 13 Features – Kevin Fenzi on 10 May, 2010 at 01:00 UTC

As we get closer to the release of Fedora 13, this is a great time to run a class on something you are working on thats going to be released with Fedora 13, so do consider attending, signing up to teach a class yourself, or peruse the logs after a session. All the info on how to do that is on the Classroom page.



Jeffrey Haemer : NCAR Manufacturing Presentation




















April 27, 2010

Tummy.com Blogs : Initial btrstress results.

From: Sean Reifschneider

Just a FYI follow-up on my previous post about having started running some stress testing of btrfs: it seems to have run into a bug in btrfs after around 8 days. I had done a couple of stops of btrstress, removals of the test data, and restarts. I had also enabled compression, which I'm wondering if that was the cause of the problem. The issue seems to be a NULL pointer dereference (which has been reported to the btrfs mailing list).

I'll look at starting another run, once I've made sure nobody needs any information off the system as it is now.


April 26, 2010

Darrin Goodman : Bulk Resizing & Rotating Images In Linux Using Nautilus

Although I’ve been meaning to share this information with you for some time, it was a comment in this post that recently prompted me to get busy writing.  Someone asked the question, why use Nautilus in OpenBox?  Gnome is the desktop manager that I use at work, and Nautilus is the file manager that I use most often on that machine; however, all of my personal machines run either OpenBox or Pekwm, and I wanted to still be able to use the scripts and features that I have grown to love that are available for Nautilus.

How to bulk resize images with Nautilus:

This is a feature that I use regularly in Nautilus.  Sure, there are likley other ways to bulk resize images, possibly with Imagemagic or some other cli tool, but the method that I am about to describe is fast and easy, and it works well for me.  First, make sure that you have installed Nautilus.

$ sudo apt-get install nautilus

Then install the nautilus-image-converter package.  If you have opened Nautilus, make sure that you close the application before installing the image converter package.

$ sudo apt-get install nautilus-image-converter

If you are a Gnome user, you may have to restart Gnome in order for the settings to take effect; if unsure, just log out and log back in. If not a Debian user and you wish to use the nautilus-image-converter application, you can find packages for other Linux distributions here:
http://www.bitron.ch/software/nautilus-image-converter.php

Open Nautilus and navigate to an image or selection of images.  Right-click on the image(s) and you will see that there are two new options listed near the bottom of your menu.  Resize Images / Rotate Images

Click on the Resize Images option.  If you have selected multiple images, this tool will bulk resize all of the images for you. Various resizing options are available to you:

  • Resize using a list of predetermined sizes
  • Scale images based on percentage of reduction
  • Specify a custom sizing scheme
  • Make a copy of the original file, resize it, and append “.resized” or some other custom wording at the end of your file names
  • Resize in place, meaning that you will be resizing your original file

If you are resizing a mass of high resolution images, go get yourself a cup of coffee and some breakfast because it’ll take a while, but far less time than if you had to resize each image individually with your favorite image editing tool.

Rotating Images With Nautilus

Of course, there are many tools that will allow you to rotate an image, and I will often times use alternate tools for image rotation (such as GPicview), but the nautilus-image-converter is a great choice if you wish to bulk rotate images, or if you have a need to maintain the integrity of your original image file and create a rotate copy.  As described above, using Nautilus, select the image or images that you wish to rotate.  Right-click on the image(s), select the Rotate Images option, and specify your desired options.  The choices are:

  • Select a preset angle (90ᵒ clockwise/counter-clockwise, or 180ᵒ)
  • Custom Angle (degrees clockwise)
  • Create a copy of the original file, rotate the copy, then append something to the file name, such as “.resized”
  • Rotate in place, which will rotate the original file

Problems/Issues for OpenBox Users

Nautilus has a tendency to take over your desktop if you are an OpenBox user.  If you are unsure of what I am saying, just launch Nautilus and you will see what I am talking about.  Your desktop wallpaper image will likely change or go away, and you will loose the ability to right-click on your desktop and obtain the beautiful menu that you are so accustomed to seeing.  Urukrama has written a very detailed guide to using OpenBox (much of which also applies to Pekwm) and he explains how to prevent Nautilus from taking over your desktop settings.

For a single-use (non-permanent) way to launch Nautilus in a way that it won’t take over your desktop settings, use:

$ nautilus --browser --no-desktop

Alternately, to make this setting more permanent (this is what I do…), type the following command into your terminal:

$ gconftool-2 --set /apps/nautilus/preferences/show_desktop --type bool False

Summary

As I stated before, there is usually more than one way to accomplish a particular task, and it’s likely that there are some lengthy and complex commands that will allow you to bulk resize images via cli, and perhaps there are some other GUI tools available.  The “best” method to accomplish a task is really a matter of individual opinion; the method that I have described is what I have found works the best for me.  If you have a bulk-image-resize procedure that works well for you, I’d love to learn about it, so please share it with us in the comments.



April 24, 2010

Kevin Fenzi : Fedora elections coming up

Per Paul’s announcement on Elections, Fedora will be holding Elections for FESCo and the Fedora Board starting with nominations opening tomorrow.

I am going to throw my hat back in the ring for FESCo again. I hope folks will consider voting for me.

I would like to see a number of things through in the next cycle:

  • I would like to see more folks working on Fedora Engineering Sevices, and more tasks for them that make Fedora better
  • I would like to see us implement and put in place our new updates policy.
  • I would like to see us look longer range and come up with a better updates policy and ways to implement it. For example, I think we can expand the karma concept in bodhi a good deal and work on test plans for bugs and packages.

And many more items too.

If anyone has any questions for me on plans, goals or how I envision the engineering side of Fedora moving ahead, feel free to comment here, drop me an email, or catch me on IRC. I’m always happy to help out and answer questions.

I hope we will have a good slate of folks for this election and some good town halls and questions.



April 21, 2010

Tummy.com Blogs : Analysis of a data loss event.

From: Sean Reifschneider

Computer hardware is pretty reliable these days. However, even with good procedures and hardware in place, there is still the possibility of data-loss. As we found out on Monday night... Despite having a well documented and tested workflow, RAID data redundancy, monitoring, top-notch personnel, and operating in a very conservative manner, we had a data-loss event that impacted 6 of our virtual hosting customers.

This is, to the best of my recollection, the first major data loss event we've had related to our hosting, since we began the hosting service over 11 years ago. I wanted to document what happened, both to provide information to the clients that were impacted and also as a lesson to the other readers.

Read on if you are interested in all the gory details. In big-enterprise circles, this is called a Service Outage Analysis (SOA). (read more)


April 19, 2010

Core Software Group : Colorado World Plone Day - 2010

This year's Colorado World Plone Day event will be held at the National Renewable Energy Laboratory's (NREL) Visitors Center in beautiful Golden, Colorado, and will be presented as part of NREL's Power Lunch series.

Colorado World Plone Day LogoPresenters will talk about various features of Plone, demo websites using Plone, and field any questions people may have.

So far, this year's presenters are:

  • Kurt Bendl - Contractor at NREL
  • Dan Timmons - CU, Boulder
  • Chris Crownhart - Core Software Group

The presentations will last from approximately 12:00pm - 12:45pm, followed by a 15 minute question/answer period.

For those of you who need to get back to work, we will break shortly.  For those of you who wish to stick around to see some developer oriented presentations, and/or to discuss Plone's features in more depth, we will have the room for a couple more hours.

Direction to the NREL Visitors Center can be found at: http://www.nrel.gov/visitors_center/contact_visit.html

The Power Lunch series is a brown bag style presentation series, so please bring a sandwich and come hang out with us for an hour.

For more information:



Tummy.com Blogs : Tricks: Using xargs to feed multiple CPUs.

From: Sean Reifschneider

xargs is a great command-line tool for parceling huge lists of files to not exceed command-line limits on length or numbers of arguments. However, it also has some arguments that cause it to manage running multiple, parallel jobs. Read on for how I used this to cut one of my jobs execution time by 75%. (read more)


April 18, 2010

Tummy.com Blogs : Patch to Python syslog module to use sys.argv[0] for "ident".

From: Sean Reifschneider

I've created a patch for the Python syslog module which:

  • Makes openlog arguments keyword args.
  • Makes openlog ident argument optional.
  • If ident is not passed to ident, basename(sys.argv[0]) is used.
  • The first call to syslog.syslog() calls ident() with no options (if it hasn't previously been called).
  • Variously related documentation changes.

The patch is in the issue tracker as Issue 8451. If anyone out there has the inclination to review it, I'd appreciate it.


Tummy.com Blogs : btrstress Program Available

From: Sean Reifschneider

Several months ago I wrote a "zfsstress" program. This program emulates the use-case of our old backup servers, which would regularly cause the OpenSolaris systems we were running them on to reboot. As I've mentioned before, zfsstress has shown that the stable release of zfs-fuse is quite good.

Now that btrfs has the ability to delete snapshots, I decided to port zfsstress to btrfs, and the result is available at ftp://ftp.tummy.com/pub/tummy/zfsstress/ along-side the zfsstress program.

I've been running btrstress on a test Fedora 13 Beta system for the last week, and it's been working very well. I am getting "unlinked 1 orphans" in dmesg periodically, I haven't been able to find anything saying what that is about. So far though, btrfs is looking pretty good.

One kind of curious thing is that I let btrstress fill up a 200GB partition, then I deleted the btrstress subvolume. The delete of 200GB of data returned in around 20 seconds, but df showed the file-system still full. It was cleaning up in the background, which is just great -- I don't have to wait for it before the command returns. It took around 10 minutes for the data to be completely removed.


Kyle Anderson : Sparkfun’s Autonomous Vehicle Competition

The Sparkfun Autonomous Vehicle Competition (AVC) was a smash! You can watch some footage of the event at Sparkfun’s Ustream page.

Here is what the starting / finishing line looked like:

And some judges on the roof watching to make sure the Flying robots do not cut corners.

I was very impressed by the UAVs (unmanned aerial vehicles). Most of them were able to complete the course in record time. Some were even able to land autonomosouly!

Robota-Landing DougWiebel-landing Robota-Launch

Sorry for the 3gp format, it is native to the Droid. I wasn’t satisfied with the outcome of a transcode from ffmpeg or gstreamer. If someone wants to transcode for me, I would be happy to re-upload.

I was unimpressed with the ground vehicles. Only a few were able to complete the course. (Just four turns around the Sparkfun building) Most couldn’t make it past the first turn. Did they simply not test them? Was it the new environment? I wasn’t able to tell.

For sparkfun, having a three-piece band to play during the heats was a big win! They certainly kept the audience entertained, and by the time the 3rd heat came around, every team had their very own made-up-silly-them-song. I suppose it would be the equivalent of the organ player at a baseball game, but on steroids.

I hope to enter and win the next years competition!



April 17, 2010

Tummy.com Blogs : Improving Deduplication Performance Under ZFS-FUSE

From: Sean Reifschneider

I've been running some tests with real, live data on the ZFS-FUSE devel branch that I mentioned previously I am testing.

My initial tests were performing rather poorly, in the area of 1MB/sec for 250GB. In other words, it took 3 days to rsync 250GB. However, a conveniently-timed thread on the ZFS-FUSE mailing list saved the day. The remainder of this message includes some tools and techniques for determining how big your ARC needs to be to get good performance. (read more)


April 11, 2010

Tummy.com Blogs : ZFS-FUSE Status: Testing with DeDup going well.

From: Sean Reifschneider

I've been continuing to do a variety of testing with ZFS-FUSE, concentrating largely on the development branches which implement deduplication. I'm using Emmanuel Anne's branch, the 94767eeb512704d673e301eb6c837ee108739bd4 branch. With a change to kernel parameters, this has been running without any problems. Continue reading if you would like more details. (read more)


Kyle Anderson : Yes yes… very professional…

I’m not saying that all OS’s don’t have problems, but it would be nice if you didn’t plaster the problems all over the store :)



April 08, 2010

Jason Schaefer : * Creating a custom wordlist for john the ripper

I wanted a larger wordlist than the default /usr/share/john/password.lst, with only 3115 words. Openwall sells a really great wordlist, but if you don’t need anything that fancy you can follow these instructions. The apt-get bit is debian specific. I will install dictionaries and then concatenate them all into one file, remove duplicates, lower case and configure john to use the new list.

apt-get install john wamerican-huge wamerican-insane wamerican-large wamerican-small wamerican aspell
aspell dump master > custom-wordlist
cat /usr/share/john/password.lst >> custom-wordlist
cat /usr/share/dict/american-english* >> custom-wordlist

You can concatenate more wordlists into the custom-wordlist file as you find them. Debian has lots more dictionary type packages. For instance, apt-cache search wordlists. Use dpkg -L [installed-package-name] to find where the actual word list file is installed.
Lets count how many lines (words) are in our wordlist so far:

wc -l custom-wordlist

I got 1484152, There must be tons of duplicates. Lets get rid of them. We can also lowercase everything, since john toggles case automatically for us.

tr A-Z a-z  custom-wordlist.txt > custom-wordlist_lowercase

Now we remove the duplicates

sort -u custom-wordlist_lowercase > custom-wordlist_lowercase_nodups

How many lines do we have now?

wc -l custom-wordlist_lowercase_nodups
613517

Now we can set john up to use our custom wordlist file.

Edit the file /etc/john/john.conf
Wordlist = [path to custom-wordlist_lowercase_nodups]

Now we are ready to crack some passwords! First, combine the passwd and shadow files. This will allow john to use the GECOS information from the passwd file. GECOS is the user information fields such as first, last and phone. These fields will be used by john to make a more educated guess as to what that users password might be.

unshadow passwd shadow > unshadow.txt

run john against the resulting unshadow.txt file

john unshadow.txt
Loaded 15 password hashes with 15 different salts (FreeBSD MD5 [32/64 X2])


Jeffrey Haemer : Performance Tuning Shell Scripts? Why, yes.

Can I write a command-line that lists open TCP ports as quickly as nmap? No way. But can I make one that's fast? Yes, indeedy.

The trick is to do it all in a single shell command.

I always read Hal Pomeranz's weekly, Command Line Kung Fu blog. Inevitably, either I learn something because he tells me, or I learn something because it gets me thinking about how I might do what he's done differently. (That's not an exclusive-or.)

This week, Hal writes a command-line that looks for open TCP ports.

Here's his command. (For a dramatic reading, see his post.)
for ((i=1; i<65535; i++)) ( echo > /dev/tcp/localhost/$i ) 2>/dev/null && echo $i; done
It isn't fast, and he ends with, "But really, if speed were a factor you'd be using nmap instead."

But can I get it to run faster? At least a little? Why, yes I can.

Replacing this:
for (( i=1; i<65535; i++ ))
by this:
for i in {1..65535}
and this:
echo > /dev/tcp/localhost/$i
by this:
> /dev/tcp/local/host/$i (or even < /dev/tcp/localhost/$i )
make minor improvements.

But a bigger win comes from getting rid of subshells.

The parens around the echo create a subshell, which requires a fork() and an exec(), each time through the loop.

By getting rid of those, and discarding error messages at the end of the loop, all the work takes place right in the parent shell.

How much does that improve things? A lot. Here are the numbers.

$ time nmap -p1-65535 --open localhost

real 0m1.366s
user 0m0.280s
sys 0m0.850s

$ time for (( i=1; i<65535; i++ )) ( echo > /dev/tcp/localhost/$i ) 2>/dev/null && echo $i; done

real 1m55.727s
user 0m12.640s
sys 1m28.200s

$ time for i in {1..65536} ; do >/dev/tcp/localhost/$i && echo $i; done 2>/dev/null

real 0m6.203s
user 0m3.290s
sys 0m2.780s

Tom Christiansen claims he can usually write Perl scripts that run within a factor of 'e' (2.718281828...) of the equivalent C program. Here, I'm only doing half that well, but that's not bad.

Even in the shell, sometimes a little tweak makes a big difference.

I'd offer extra points to the reader who knows an attribution for the quote "Make it work, then make it fast," but that would require readers.

It was, however, Frank Zappa who said, "Speed will turn you into your parents."


Kyle Anderson : How to Fix a Power Plug with Sugru!

I have a first generation Asus Eeepc, but the power plug is failing. All plugs do this eventually. Lots of tiny wires, bending back and forth all the time… It just happens.

So should I throw it away and buy a new one? No! It can be easily fixed. Here is what you need:

  • Soldering Iron + Solder
  • Flux helps if you have it (If you have not soldered with flux, you are missing out big time)
  • Heat shrink or electrical tape
  • Sugru can add a nice touch

Start by using a sharp blade to cut off the plastic molding around the connector to expose the raw barrel connector and wires:

Now your soldering skills will be put to the test. Flux helps! Don’t forget to put the heat shrink on first before you solder:

Yea, the sugru, graciously provided by DangerJim could use an artist’s touch.

But it works! Looks pretty good.



April 01, 2010

Paul Hummer : Where's My Ubuntu Powered Tablet?

On Saturday, I'll be riding down with my good friend Jeremy to Boulder and braving the Apple Store madness so he can pick up his shiny new iPad. I've looked at the iPad, and I'm not sold. I usually don't want to buy Apple products on principal, and have also been trying to get out of the gadget race as well. These two things probably provide for a perfect storm of indifference towards the iPad.

As I look on my desk right now, I have my ARM-based Beagle Board devkit, my FPGA, an OpenMoko Freerunner, a Nokia 770, and my eBook reader, I'm pretty sure that I can convince myself to buy anything. In fact, I find that the re-occurring theme is that I'll buy just about anything if it comes with Linux on it, or has the ability to have Linux on it after the fact. Bonus if it'll run Ubuntu or Debian.

So here's my question to all those hardware providers and OEM/ODM people: "Where is my Ubuntu-powered tablet?" I want one, and I want it yesterday. I want multitouch and good battery life and wifi and all that cool stuff. Ubuntu already has an ARM port, so it should be pretty easy. Just put everything together and ship it to my house. I will pay no more than $500. Well, that is unless it starts making breakfast for me or something. Then I'll consider paying a little more.

Oh yeah, and that JooJoo tablet? No. There's just too much bad "joojoo" around it. My karma doesn't need a hit like that.



March 30, 2010

Tummy.com Blogs : What advice would you give yourself?

From: Sean Reifschneider

For about the last 6 months I've been trying to decide what advice I would have wanted when I was 18 (for me, that was 1988). A recent XKCD combined with a "homework assignment" from my about-to-graduate nephew's English teacher finally combined forces to get me to sit down and write a letter from the past. What advice would you want to have heard as you were about to take another step into the "real world"? I mean besides "Don't Do It (tm)!".

Read my letter from the past here.


March 29, 2010

Jeffrey Haemer : There's a Lesson Here, but I Can't Remember What

Perhaps you are graced with a mind like a steel trap. I have always had a mind like a steel colander.

I frequently read stuff I wrote, and think, "That's clever. Too bad I can't remember ever knowing that, much less writing about it."

Just now, I was reading an RHCE-prep guide that was explaining pr. I thought, "pr? Geez. There's some ancient history. Next they'll be explaining FORTRAN line-printer-carriage-control codes."

This starts me reminiscing.

"There was an old, Software Tools filter, in RATFOR, that would interpret those codes, called asa (a reference to the American Standards Association, a progenitor of ANSI's). At some point, it was ported to C/Unix. I should see if it's on my Ubuntu desktop."
(As an aside, and before I forget to say it, Kernighan and Plauger's Software Tools is the best book ever written about software engineering.)
It's not there. I think, "Well, okay, I'll install it.

I try apt-cache search and don't find it. Rats.

I google for an Ubuntu version. Nothing. A Linux version? Nothing. Humph.

Well, surely it was in UNIX Version 7. I remember some work Tom Christiansen put in, collecting Perl implementations of old, V7 commands. Maybe he found an implementation of asa(1) that I can just port.

Except I can't remember what he called his collection. I go back to googling, this time for Tom's collection. After a bunch of failed tries, I finally get a hit. You guessed it: a column by Jeff Copeland and, um, me -- Software Ptools -- which I have no recollection of ever having written. How embarrassing.

I should have given up right there, while I was behind, but Noooo .... ("What would you pay? But wait! There's less!")

Had we provided the name of Tom's project? Sho 'nuff: "Perl Power Tools." Maddeningly, the link in our column has gone dead. The universe hates me and there's no beer in the fridge.

I scroll down, hoping for another link. Ooh! Look! There's code! We implement a V7 command, right there in the column, to contribute to PPT ourselves.

We implement asa(1)

Oh, ow.

(I've now learned that the entire Perl Power Tools project has been moved to the CPAN by Casey West.)



March 25, 2010

Darrin Goodman : Resizing VirtualBox Session Window (Screen Size)

Note: This post is mostly a “note to self”, but I thought that others might also benefit from this information too.

Lately I’ve been using VirtualBox to test out various Linux distros, and to re-familiarize myself with the otherwise less familiar… Having rooted myself for some time now in Debian-based systems, I thought that it would be fun to revisit RPM-based distros by experimenting with CentOS, and I’ve also been enjoying Arch Linux quite a bit lately (note: if you’re not familiar with Arch, check out the “Arch Way” to see if it fits with your computing philosophies…). Additionally, with the arrival the latest CrunchBang Linux (v.10) (#!), previously a Ubuntu-based system that has migrated to Debian with this latest version – I’ve been really enjoying the latest release of #! and have been interested in learning about how it differs from previous releases.

Although a great tool, one of the issues with using VirtualBox is that the default screen size is so small. To enlarge the screen size of your VirtualBox session, try doing the following:

-==[ FIRST ]==-
On the virtual console, click the Devices drop down, and then select Install Guest Addons.  This will mount a virtual CD within your virtual session.  You may get an error at this step but just hit Ok and it should likely work.  Now you should see a CD icon on your desktop or in your file manager.

-==[ SECOND ]==-
Open up your Terminal and type:

$ cd /media/cdrom0

In this folder there are some scripts for 64 bit linux and 32 bit.  If you find that the 64bit files do not work properly, you may have to use the 32 bit version within 64 bit linux.  On my 32 bit system, I’ll go back to my terminal and type:

$ sudo sh ./VBoxLinuxAdditions-x86.run

-==[ THIRD ]==-
This will configure your virtual session so that it can allow you to use higher resolutions. First you must reboot your virtual session or restart the display manager by hitting Ctrl+Alt+Backspace (the latter works depending on your host Linux distribution…).

-==[ FOURTH ]==-
Using your tool of choice in the guest operating system, set the screen resolution for your guest OS and the session window should resize.

Screenshot: CentOS and CrunchBang v.10 running in VirtualBox on Ubuntu 9.04 host:

Source: http://www.fettesps.com/virtualbox-increasing-your-screen-resolution/



March 24, 2010

Kevin Fenzi : EPEL wiki pages

After seeing this weeks Wiki Challenge from Max Spevack I took a look at the EPEL wiki pages. Sadly, I think I have looked at them too much, so it’s hard for me to tell if things need different orginization or clarification. So, instead I would like to offer to help anyone else who wants to clean them up: Find me on irc in #epel (my nick is ‘nirik’). Or drop me an email and I will be happy to explain/clarify/expand on any info in the EPEL wiki space and help you clean it up.

I think someone who has never used or seen EPEL would be a great person to work on this, as you could see the pages in a light that a new wiki visitor would.

I hope someone will take up the challenge. ;)



March 23, 2010

Paul Hummer : Browser Viewport Size. You Are Assuming It

I was subjected to using Launchpad this weekend on my netbook. It was relatively terrible, because the netbook has such a small viewing area, and Launchpad really has the "desktop" in mind. Google Reader is also relatively terrible on a netbook. I ended up writing a really dirty Greasemonkey script to hide all the unnecessary crap above the content in Reader so I could actually just focus on the feeds.

It got me thinking about app development in Android and iSlave. Android devices, for instance, have many different screen sizes (and with the iPad coming out, so will Apple's devices). They solve the different screen size issue quite elegantly. In fact, for the most part, you don't have to deal with pixels and positioning. Of course, this also increases complication in some places, but generally only requires some limited XML knowledge.

So I brought this up at my coworking space yesterday with other designers, developers, and non-technical people. After whiteboard scribbling and discussion, I came to a single conclusion: CSS was the wrong solution for page layout.

Web applications are becoming the de facto applications for many people. I think I'm a minority now because I still use a desktop mail client. My feed reader is a web app though, as are most of organizational tools. Native application developers are quickly moving into the webapp space only to find that the problems they already had grand solutions for on the "desktop" have generally been hacked around or ignored in the webapp world.

I'm not sure if I have a proposed solution that can be dealt with in the short term. There's a lot of momentum behind HTML 5, and I think some designer somewhere will put a bounty on my head if I suggest taking away the layout functionality of CSS. Maybe we just need a toolkit that'll remove the absolute heinousness of css layouts by providing a layer of abstraction. Javascript would probably have to play a part in this story, but I'm pretty convinced that those who browse the web without javascript would probably be happier on a BBS anyway.

Suggestions? Comments? Ideas? I'm sure that with the collective smartness of web developers, we can solve the problem of different browser viewports and create fluid layouts for web applications. Anyone wanna volunteer and make it? I promise to "test" it. :)



Paul Hummer : Nexus One, Rhythmbox One, Ubuntu One (Music Store)

I spent some time tonight playing around in the Ubuntu One Music Store. I bought some music (yes, I paid for it, and I will continue to pay for music). So I grabbed a few albums for stuff I intended to buy on Amazon's mp3 store (except that their client doesn't support 64-bit), and started jamming away. The experience is awesome, and I'm glad that my music purchases are going to support Ubuntu (I may singlehandedly support it at the rate I bought music tonight...).

So I'm jamming out with my DRM free songs that I got on my free software OS, and am feeling pretty good. The only thing that would be more awesomerest than purchasing music from the Ubuntu One Music Store is to be able to put them on my Nexus One phone that's also kinda free software. Then my experience would be complete as comparable to the Windows/Zune and OS X/iPhone experiences.

Rhythmbox didn't actually like my Nexus One very much. It didn't recognize it as a media device, so if I wanted to put music on it, I had to use Nautilus or the terminal. Ew.

Turns out, I can just create a .is_audio_player file on the root of the SD card for the Nexus One and put the following contents into it:

audio_folders=Music/
folder_depth=2
output_formats=audio/mpeg,audio/mp3,application/ogg

Unmount and remount the Nexus One and voila! You should see your SD card in Rhythmbox and you can copy music over to it. My one wish is that instead of seeing 8.0 GB Filesystem I could set the label in Rhythmbox to be "Nexus One" or something really sexy like that.



March 18, 2010

Kyle Anderson : Status.net – The future (hopefully) of microblogging!

First, if you think Twitter / Google Buzz / Petstatus.com are silly and just fads, you can go ahead and navigate away from this page.

For those of you who believe that “microblogging” is a new form of communication between people, then listen up. If you have an account on twitter, why do I have to have an account on twitter as well to subscribe to your updates? What about facebook?

If you have a hotmail email account, I don’t have to have hotmail to email you, why should it be the same with microblogging?

What we need is a common protocol, so people on different networks can follow and join the conversation! What we need is a protocol… what we need is…

Yes, Status.net! Status.net is an application that allows you to microblog, and converse with people even if they are different networks. That’s right! Now you can follow your favorite pets on Petstatus.com even though you are on Identi.ca. People on Swisen.com can subscribe to people on WowTweet.net. Amazing!

And guess what, you can actually MOVE and DELETE your status updates. Yes you actually own them. You can move them to another server if you want. Does twitter allow that? Didn’t think so.

If you are using Dreamhost to host a website, installing Status.net is super easy! They have one-click install for status.net. If you have trouble working with their installer, I have some notes that might help.

So when you are ready you can follow me! http://xkyle.com/status/



March 14, 2010

Tummy.com Blogs : @reboot and other cron fun.

From: Sean Reifschneider

swarren and I were just chatting and he mentioned putting something into rc.local. I said that I tended to prefer using "@reboot with cron" over rc.local these days. Partly because I don't like rc.local, partly because it keeps most of my system maintenance stuff in one place on my laptop. Stephen hadn't heard about @reboot though...

The cron daemon supports several "@ nicknames" for use instead of the normal set of time values: @reboot, and @hourly (daily, weekly, monthly, yearly/annually).

I use this in my personal crontab for a job I want run once at boot time:

   @reboot ~/bin/archivevimswap >/dev/null 2>&1

This is a small shell script that moves my ~/.vim-tmp out of the way and creates a new ~/.vim-tmp. I have vim configured to put all the tmp files in there, so that I don't end up with them littered all over the disc.

Just to be canonical, I'll mention that you can also be lists, ranges, and steps, so things like "*/5 * * * *" is every 5 minutes, "0 9-17 * * *" is the top of the hour from 9am to 5pm, and "15,20 * * * *" runs at 15 and 20 minutes past the hour.

Lately though, I've been thinking about what a next-generation cron would look like. It would be nice to say "I have these 10 jobs that need to be run between midnight and 4am, but I only want 3 of them running at once." Rather than having to try to stagger them. I could imagine a use for also having it "kill -STOP" jobs if the load goes above a certain value, or "kill -CONT" when it drops. Or even coordination among machines (I have 10 machines, they all need to run CPU-intensive jobs after midnight, but I don't want to cause a spike in power consumption or drop in responsiveness among all of them).

So many possibilities...


Jeffrey Haemer : Estimating: The Envelope, Please.

How much does it cost Amazon to ship me a Kindle book? About a nickel.

How much did it cost us to get letters saying we're going to get census forms? About $50 million.

How do I get these? Back-of-the-envelope calculations.

Back-of-the-envelope calculations are the quick calculations we do, from simple assumptions, to give us a sense of rough sizes. They may not let us tell whether the answer is 5 or 9, but they can let us see the answer isn't 5 billion -- a 5 followed by 9 zeros.

My sister, Jo, the Tattooed Lady, wondered out loud, this week, "... just how many millions of dollars it cost The US Commerce Dept (read 'us, the taxpayers'), to send everybody in the US a letter this week that says that they will be sending us a census report to fill out. 'Ooooooo. Look out!!!! Here it comes!!!' "

Let's do a back-of-the-envelope calculation. (No pun intended.) It's not hard.

How much does it cost to send a letter? A first-class stamp costs $0.44. The USPS loses money, which is why they want to cut back to 5-day-a-week delivery. So the real cost of processing and delivering a letter is something like $0.50. Could it be $0.30? Or $0.72? Maybe. But it's less than five bucks and more than a farthing.

What's the cost of producing each letter -- printing, stuffing, and so on? At Kinko's, they'd charge you somewhere between a nickel and a dime. Ditto for the public library. Real money, but we're still talking a total cost of around half a buck per letter.

They sent one to each household, and America has over 100 million of those.

We paid at least fifty million bucks for those letters. $50,000,000 . As Jo says, "Here it comes."

But what did we pay to draft the letter, translate it into a bunch of other languages, and get all that approved and processed through our Federal bureaucracy? Probably not even an extra fifty million.

Here's a second example: What sort of profit is Amazon making on Kindle books? I wondered this last year when I bought my Kindle.

Let's see .... Once they've payed the publisher for the book, they probably get a machine-readable version for next-to-nothing -- maybe free. Converting to the Kindle data format is probably done by a piece of software that they wrote once, and amortize across all their books, which means that probably doesn't contribute much either. Amazon's big cost is probably delivery -- what they pay Sprint to get it to us.

So how much is that? Hand me that envelope.

They'll sell me a subscription to a blog for about $2/month. The content is free if I have a browser, and I can't imagine they're trying to make a lot of money from these, either. The $2 is probably Amazon's delivery cost.

The kind of person who reads a blog on his Kindle is a junkie who, I'll guess, might read it three times a day. That's 30*3 = 90, or about a hundred deliveries a month: two cents a day. Books are bigger, but they come over so fast that I bet connection-set-up and -tear-down costs dominate the price.

Amazon's sells new releases at $9.99. This calculation says almost all of that is profit. Their delivery cost, I guessed, was under a nickel a copy.

How close did I come? In a January press release, Amazon revealed it was "less than six cents."

When the government can send us useless letters by Kindle (or email), they'll cost us far less.

"But what could the government do with its vast inventory of surplus envelopes?" the politicians will ask.

Two suggestions come to mind.



March 13, 2010

Kevin Fenzi : communication breakdown

I’d like to take a few minutes to remind people of something that I think they all know, but might have not had in the front of their mind recently:

Different types of communication have different amounts of information bandwidth.

  • If you are talking in person, face to face with someone, you have a lot of bandwith. You can hear the tone in their voice, see if they are smiling or frowning. Hear if they are yelling. See if they are slouching or waving their hands a lot. See if they blink, look away or frown at you. You can get a lot of information from an in person conversation, and most of us have been doing it all our lives, so we pick up on subtle cues without thinking about it.
  • If you are talking to someone on the phone you have less bandwith. You can now not use any of the visual ques. You can still however listen to tone of voice, volume and laughing/crying/sobbing. Most of us have spent time on the phone and pick up on these clues pretty easily as well.
  • If you are exchanging emails with a list or persons, you now have even less bandwith. You can use things like :( or :) and you do have time to think and be more deliberate with what words you use (if you choose to), but you have no tone of voice or visual clues. Just the words.
  • Finally, if you are communicating with someone via irc or other IM/chat you have even less bandwith. Here people are expecting you to just blurt out your thoughts without much editing or consideration (unlike email). You have no sight or sound to help you, as well as no time to carefully consider your response.

To quote the freenode channel guidelines:

Look for the best in people. If you assume people have no self-control, they’ll confirm your belief. If you look for personal responsibility, and ask for personal responsibility, most people will respond well.

Set a good example. Be what you want other people to be. If you want them to be calm, be calm. If you want them to be courteous and friendly, be courteous and friendy. The habitual behavior of people on a channel is the most powerful influence on newbies arriving on the channel.
I think this is great advice for all the communications mediums above, and would like to remind people to keep in mind the bandwith involved when you are replying to someone. They may well have not said what you think they said, or at least not the way you think they meant it.


Kevin Fenzi : on re-installing things

Often over in the #fedora IRC channel, we have people who come in with some issue or problem who only spend a minute or two gathering information on it before asking: “Should I just re-install?”. Sometimes they mean re-installing the application/package, and sometimes they mean just reinstalling the entire OS! I fear this is a ingraned reaction from the closed source software world where there is really sometimes no way to tell what the application/os is doing and returning it to a clean state is the only choice. Thats not (usually) how things work in the open source world though. :)

  1. First ask yourself: Did this thing work before? It doesn’t now? What changed? Check /var/log/yum.log or other history and find out exactly what changed. Did you change a setting? Did you upgrade a package? You can think look for how to revert that specific thing that caused the problem. No need to re-install.
  2. Do you have reason to think the package or application was messed up somehow on your disk? ie, do you have disk problems, or did you run a script as root that might have messed up binaries? Sure, then a ‘yum reinstall package’ might be in order.
  3. Does the problem/issue occur with another newly created user? If not, then that points to a user specific setting. Reinstalling the package won’t do any good, because the setting is tied to your user. Instead look for what that setting is or how to revert it.
  4. Is the problem/issue causing you to not be able to boot? Instead of re-installing, look to a rescue media. You can often fix the issue by booting ‘linux rescue’. No need for a re-install.

About the only time you should absolutely re-install your OS is when your machine has been compromised. Otherwise, it’s a lot better to fix the real issue, no only because it’s often easier, but because you will learn something in the process!



March 12, 2010

Jason Schaefer : * Flashing a BIOS update using only free tools (FreeDOS, etc)

The wonderful world of motherboard BIOS updates, is still old fashioned. Updates are often still built for Microsoft Windows environments. Often requiring MS DOS. Those of us who don’t have DOS, a floppy drive, an install of Windows 98 to create a bootable floppy, cheesy Pâté, or MS Windows for that matter ….. Here is a way one can flash that BIOS of your mobo using, our favorite free software licensed, operating systems and tools.

DISCLAIMER: Don’t attempt this unless you know what you are doing. I have never had problems doing this, BUT many things can go wrong and you CAN easily “brick” your hardware. Proceed at your own risk!!

We will be using FreeDOS, a wonderfully free and royalty exempt Microsoft DOS compatible operating system. Licensed under the General Public License (GPL).
Note: As usual, my posts require some knowledge of the command line.

wget http://www.fdos.org/bootdisks/autogen/FDOEM.144.gz
gunzip FDOEM.144.gz
mkdir floppy
sudo mount -o loop FDOEM.144 floppy/
ls floppy

you should see these files:
AUTOEXEC.BAT COMMAND.COM CONFIG.SYS KERNEL.SYS README sys.com

Download your BIOS update file from the manufacturer or vendor.
Note: Sometimes, the update will be distributed as a .exe (Windows Executable) file. Most likely it will actually be a compressed zip archive. You can use unzip to extract the .exe file.

Download the update using wget, then unzip the resulting image file “FDOEM.144″ into the mounted folder: “floppy/”

wget http://path-to-your-bios-update/BIOS_UPDATE.zip
sudo unzip BIOS_UPDATE.zip -d floppy/

In this case, the following files are extracted from the BIOS_UPDATE.zip file:
inflating: BIOS.WPH
inflating: OEMPHL.EXE
inflating: OPTIONS.BAT
inflating: PHLASH16.EXE
inflating: releasenotes.txt
inflating: 1.BAT

now, move to the previous directory (cd ..), and un-mount the FDOEM.144 image:

cd ..
sudo umount floppy/

generate the iso image:

genisoimage -o flashboot.iso -b FDOEM.144 FDOEM.144

Now burn flashboot.iso to CD using wodim:

wodim flashboot.iso

Now you can boot from that cd and run your flash utility!! Read the BIOS update instructions on how to do this..



Paul Hummer : Book Review : Designing Social Interfaces

http://www.designingsocialinterfaces.com/images/book/book-cover_home.png

I just finished reading Designing Social Interfaces. The book is written by the creators of the Yahoo! Pattern Library. I had no knowledge of any such pattern library previous to reading this book, but I've really been exploring the idea of creating user experiences on the web that will bring in users and keep them happy (and not confused). I think a lot of this interest has to do with Canonical's current focus on design and usability.

The book is an O'Reilly book, but once it's opened, it certainly doesn't feel like an O'Reilly book. The pages are slicker than normal O'Reilly books (and I own many of them). They're also in full color. This is great for a user experience design book, since it's often hard to look at screenshots of web sites when they're in black and white.

I soon realized that I was fascinated with the book itself. When it comes to web design, there are a few staples (Don't Make Me Think comes to mind), the books don't seem to be specific enough. They usually just show good examples, but they don't show the why of the good examples. Designing User Interfaces starts with the why, which is something I can really appreciate.

As a developer, I also have a tendency to think in "design patterns." By presenting the interfaces as "patterns," it was easy for me to start thinking up my own variations of those design patterns to work with my existing experiences and products. This is probably what sealed the fate of this book. It made me excited to re-design and re-think interfaces I've implemented (including Launchpad).

I would highly recommend this book for anyone doing front end work, whether it's just implementing existing designs or creating your own designs. I've noticed that I now critique web interfaces with an eye I didn't have before I read this book.



March 11, 2010

Jeffrey Haemer : Collatz Conjecture

I like this shell script, by Kyle Anderson.

I found out about it because Paul Hummer's created a Northern Colorado Linux Blog aggregator.

Thanks, Paul! And Kyle.


March 10, 2010

Jeffrey Haemer : Generating Arbitrary Numbers

Sometimes, "arbitrary" and "random" aren't synonyms. Here's an example of how to generate the former without their being the latter.

One nice thing about knowing people who make me think is that it gives me things to post about. For example, Hal Pomeranz, Ed Skoudis, Tim Medin, and Paul Asadoorian have a weekly blog, called Command Line Kung Fu, that compares and contrasts command-line tricks for different operating systems.

I only every use Linux, so I read Hal's stuff and skip the Windows and DOS stuff. Even with this, every week or two Hal's post makes me think, "Wait! Here's something he didn't mention!" (typically because it's slightly off-topic).

In this week's column they generate random time intervals.

Here's Hal's punchline:
[...] in larger enterprises you might have hundreds or thousands of machines that all need to do the same task at a regular interval. Often this task involves accessing some central server-- grabbing a config file or downloading virus updates for example. If a thousand machines all hit the server at exactly the same moment, you've got a big problem. So staggering the start times of these jobs across your enterprise by introducing a random delay is helpful. You could create a little shell script that just sleeps for a random time and then introduce it at the front of all your cron jobs like so:

0 * * * * /usr/local/bin/randsleeper; /path/to/regular/cronjob
(The column sketches how to implement 'randsleeper'.)

Yep. This works fine.

But as it stands, the cronjob could kick off one job at 9:59, and the next one at 10:00. What if I want to spread my machines across the hour, but want each machine to use a fixed timeslot, so the elapsed time between runs is a full hour for any given machine?

Here's one way:
  1. Pick an arbitrary machine-specific number, like the IPV6 address, or the MAC address of the ethernet card,
  2. Convert it to an integer.
  3. Take it mod the time interval.
  4. Use that number for the time to start the job.
Here's code to do that, which, as always, I grow, bit-by-bit, on the command line, by getting a little piece right, recalling that piece, and adding another step.

  • Step 1:
Get a unique, but arbitrary, machine-specific identifier (the MAC address of the first NIC).
$ ifconfig | awk '/HWaddr/ {print $NF; exit 0}'
00:1e:c9:3d:c0:0c
  • Step 2:
Strip the colons
$ ifconfig | awk '/HWaddr/ {print $NF; exit 0}' | sed 's/://g'
001ec93dc00c
And interpret the result as a hex number. (The shell requires hex numbers begin with "0x", so I'll just tack that on.)
$ echo $(( 0x$(ifconfig | awk '/HWaddr/ {print $NF; exit 0}' | sed 's/://g') ))
132225286156
  • Step 3:
Mod it by the number of seconds in an hour, to get an arbitrary second.
$ echo $(( 0x$(ifconfig | awk '/HWaddr/ {print $NF; exit 0}' | sed 's/://g') % (60*60) ))
556
  • Step 4:
Always sleep until that many seconds after the hour, then kick off the job.
$ crontab -l > Cronjobs
$ echo "0 * * * * sleep \$(( 0x\$(ifconfig | awk '/HWaddr/ {print \$NF; exit 0}' | sed 's/://g') % (60*60) )); /path/to/regular/cronjob" >> Cronjobs
$ crontab Cronjobs
Ta-da.

(For step four, I'd probably actually kick off cron -e and paste the line in; otherwise there are just too many ugly backslashes to get wrong.)

Warning: This will not work if your machines' MAC addresses cluster around the same value, mod 556. :-)


March 08, 2010

Paul Hummer : Curiosities for March 2010

I bought lemonade and a granola bar from a sidewalk lemonade stand yesterday. Yes, spring is here. This (hopefully) means less computery time and more outsidery time. Yes, I just made up the word "outsidery." Coining new words should be part of my curiosities this month...

As for actual things I want to explore:

  • Jetpack - Last month I switched back to Firefox from Chrome because Chrome just didn't hack it for me as a web developer. One thing that Chrome had that I really liked was the extension mechanism. Basically. it was just some javascript. Jetpack is an extension that provides similar support for Firefox. After diving into Firefox extensions a few times and needing a lifeguard to get out, I thought I'd explore Jetpack to create simpler Firefox extensions.
  • Android SDK - I offered to help a friend create an Android App. No pay was involved, but I have been provided a more recent Android phone to replace my Android Dev Phone, so I actually have something of an obligation to complete and app for Android as opposed to just poking around in it.