Tuesday, October 26, 2010

The Completely Unofficial Beer of Ubuntu Natty

The only picture I took at UDS-N in Orlando, FL.

Only for the brave. Or the tasteless. Or those who appreciate good old fashion poignant humor.

I am at least one of the above.

:-Dustin

Saturday, October 23, 2010

Ubuntu, The Restaurant, 10.10.10

My wife, Kim, and I were recently in the California wine country, in Napa and Sonoma Valleys.

While there, we had a lovely dinner one night at the Ubuntu Restaurant and Yoga Studio.

The Ubuntu restaurant has nothing to do with the software I write, other than we share a name and actually have a similar set of principles. While we apply the tennets of Ubuntu to software, they apply it to food. The inside of the restaurant is really quite chic (like much of Napa). It really reminded me of the set from Joss Whedon's Dollhouse TV series :-)

All of the food is vegetarian, and it's ordered and served tapas style. Everything we had was delicious.

The portions looked small, but neither of us were hungry at all by the time we left.


We did have cookies for dessert, just to make sure we wouldn't leave hungry.

We did leave our waitress with a stack of Ubuntu CDs.

Their menus are custom printed every day, so in exchange, she mailed me a copy of Sunday's 10.10.10 Ubuntu restaurant menu (at the top of this post). Check out the date in the top corner:

Cheers to the Ubuntu restaurant, and the Ubuntu 10.10.10 release!


:-Dustin

Friday, October 22, 2010

Bikeshed: dman (download manpages from the web)

I have kept a little shell script called dman in my $HOME/bin ever since manpages.ubuntu.com came online, in 2008.

It's a really convenient way to read manpages in your terminal, for packages that you don't have installed locally. Assuming you're internet connected, it's a really handy tool, saving lots of disk space, while giving you access to many gigabytes of excellent system level documentation.

For example:
  dman wtf
If you find this useful, install the bikeshed package from Natty, or from the Bikeshed PPA for other versions of Ubuntu.

:-Dustin

Thursday, October 21, 2010

Bikeshed: wifi-status (monitor your wifi connection)

I work from coffee shops, pubs, and conferences quite a bit. That means lots and lots and lots of of WiFi.

Modern Ubuntu desktops have a handsome indicator applet with an animation that shows the connection process.

But I'm a geek, and I need to know in more detail what's happening with my wireless connection, especially when it seems like it's taking forever to get a wireless connection.

For this, I wrote a utility called wifi-status that's now in bikeshed. Run this from a terminal and you'll see both the iwconfig and ifconfig status of your wireless interface.

wifi-status

Every 1.0s: iwconfig wlan0; ifconfig wlan0 Fri Oct 15 14:07:49 2010

wlan0 IEEE 802.11abg ESSID:"CampusCoffeeBean1"
Mode:Managed Frequency:2.412 GHz Access Point: 00:24:7B:21:90:A0
Bit Rate=54 Mb/s Tx-Power=14 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=64/70 Signal level=-46 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

wlan0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::221:6aff:fe50:a606/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1820355 errors:0 dropped:0 overruns:0 frame:0
TX packets:2068354 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:620541137 (620.5 MB) TX bytes:1581840633 (1.5 GB)

If you find this useful, install the bikeshed package from Natty, or from the Bikeshed PPA for other versions of Ubuntu.

:-Dustin

Bikeshed: bch (seed and edit bzr changelog)

Here's another tool I use every single day, many times per day: bch.

I maintain all of my projects/packages in bzr itself, using debian/changelog to describe changes to both the source code and the packaging.

I used to use dch to edit the current changelog entry, starting a new line with an asterisk, and then listing each path of each file I've changed, followed by a colon, and then a description of my changes.

However, I can easily use bzr diff to get a good list of the files I've changed, use sort to arrange them in alphabetical order, print a comma-separated lists, and use dch to insert that list into debian/changelog. All I have to do is describe the change, save, and close the file.

Note that I typically follow bch with debcommit, which uses that same changelog entry when committing to bzr. It's really, really handy and convenient!

Try it:
  1. Grab some source code
    bzr branch lp:bikeshed

  2. Make some changes
    cd bikeshed
    echo foo > bar
    bzr add bar
    echo "" >> pbput

  3. Add a changelog entry
    bch

If you find this useful, install the bikeshed package from Natty, or from the Bikeshed PPA for other versions of Ubuntu.

Cheers,
:-Dustin

Wednesday, October 20, 2010

Bikeshed: 1 .. 9 (wicked convenient awk)

I previously introduced the 1, 2, 3, 4, 5, 6, 7, 8, 9 utilities here in my blog as useful awk hacks a few months ago.

Basically, there's one script, installed at /usr/bin/1 and all of the rest are symbolic links back to this one.

The net effect of each of these is to print the Nth column of whatever comes in on standard input. In this way, "1" is sort of an alias for:
  awk '{print $1}'
Each of these accept a single option argument. By default, whitespace is assumed to be the input field separator. You can specify a different character or string here.

For example:
  ls -alF | 5
cat /etc/passwd | 7 :
If you find this useful, install the bikeshed package from Natty, or from the Bikeshed PPA for other versions of Ubuntu.

Cheers,
:-Dustin

Tuesday, October 19, 2010

Bikeshed: bzrp (bzr with a sensible-pager)

I'll admit it ... I'm a huge fan of bzr. I'm conversational in git, but I really love the ease of use of bzr. It's friendly, convenient, and well documented.

I really only have one complaint... I really wish it paged output to sensible-pager, when running in an interactive terminal and the output is more than one screen-full.

I talked to Robert Collins about this in Wellington at LCA2010 earlier this year. He was lukewarm to the idea, asking me why don't I just pipe the output to sensible-pager. Heh. Sure, I can do that.

Okay, okay, so I created a simple alias, and eventually this wrapper script, bzrp, which basically has that effect.

Try it for yourself!
bzrp log --include-merges
bzrp diff
bzrp cdiff
This works with any bzr command that has output on standard out.

For what it's worth, I'm pronouncing this "ba-zerp" for now :-)

If you find this useful, install the bikeshed package from Natty, or from the Bikeshed PPA for other versions of Ubuntu.

:-Dustin

Monday, October 18, 2010

bikeshed: pbput and pbget (pastebin binary files)

I absolutely love the pastebinit tool, from Stephane Graber. Genius, I tell you. I must use it 20 times per day, to share source code and configuration files.

Sometimes, I need to share a binary file, such as a screen shot, or a tarball.

For that, I wrote the pbput (and pbget) scripts!

The pbput script works on either standard in, or a file argument, lzma compresses the input, base64 encodes it, and then uses pastebinit to post to pastebin.com.

And the pbget script basically reverses that process, using wget to retrieve the remote data, base64 decoding it, lzma decompressing it, and writing it to standard out.

Try it for yourself!
  pbput /tmp/Screenshot.png
http://pastebin.com/c9JtQ4WT

pbget http://pastebin.com/c9JtQ4WT > /tmp/out.png
md5sum /tmp/*png
f7e7ba26a2681c0666ebca022c504594 /tmp/out.png
f7e7ba26a2681c0666ebca022c504594 /tmp/Screenshot.png
If you find this useful, install the bikeshed package from Natty, or from the Bikeshed PPA for other versions of Ubuntu.

:-Dustin

Friday, October 15, 2010

Introducing the Bikeshed Package!

James Westby jw+debian at jameswestby.net
Wed Aug 11 17:41:16 BST 2010
On Wed, 11 Aug 2010 12:32:34 -0400, Dustin Kirkland wrote:
> We have some initiatives right now, trying to make it easier for
> people to get new applications into Ubuntu, and the Ubuntu Software
> Center. This is merely a 10-line, GPL'd shell script, and most
> developers agree on its usefulness. But the experience of giving this
> code away for the benefit of others is less than ideal. I'm happy to
> persevere, push it to the right place, do the right thing. But will
> the next aspiring developer who wants to share a small, useful hack
> bother themselves with the process?

Maybe as an Ubuntu core-dev you want to upload a useful-hacks package
and accept all contributions in this vein in to that?

Thanks,
James
Like many of you, I have some useful scripts in my $HOME/bin directory, and aliases in my $HOME/.bashrc.

I have contributed some of these to existing open source projects, while others have turned into stand-alone free software packages/projects themselves. In other cases, I have tried, with great heartache, to contribute useful utilities to open source projects. Sometimes these work out eventually, but it can take many months or years of persistence to win the approval of some maintainers. These are most certainly battles worth fighting, but in the meantime, there are many Ubuntu users and developers who could benefit from these tools.

Per the suggestion from James Westby in the note above, I have founded the bikeshed project at http://launchpad.net/bikeshed. You can grab the source code with:
  bzr branch lp:bikeshed
And you can install the package from the Bikeshed PPA for Karmic, Lucid, and Maverick if you like. It just landed in Natty today.

The mission statement of the project is:
  • While others debate where some tool should go, we put it in the bikeshed.
The package description goes into a little more detail:
  • Description: random useful tools that do not yet have a permanent home
    Bikeshed is a collection of random but useful tools and utilities that either don't quite fit anywhere else, or have not yet been accepted by a more appropriate project. Think of this package as an "orphanage", where tools live until they are adopted by loving, accepting parents.
The name of the project reflects the tremendous insight provided by Poul-Henning Kamp on a FreeBSD mailing list in 1999. If you haven't read it yet, I highly recommend you do. It's 11 years old and directed toward FreeBSD development, but it applies to ubuntu-devel@ and debian-devel@ and most other software development mailing lists just as well today.

The general concept is known as Parkinson's Law of Triviality, from 1957, when C. Northcote Parkinson described the unfortunate effects of trivial matters carrying disproportionate weight (and actually first used the bike shed example).

I'm going to describe each utility in bikeshed in a series of posts here in my blog. Hopefully you will find some of them very useful!

:-Dustin

Tuesday, October 12, 2010

Ubuntu OpenWeek: Deploying Web Applications in the Cloud


Howdy all!

This week is once again Ubuntu Open Week!

Join me tomorrow, Wednesday, October 13, 2010 at 17:00 UTC in #ubuntu-classroom on irc.freenode.net for a session on Deploying Web Applications on Ubuntu in the Cloud!

As usual (when I give education sessions), I will be communicating in #ubuntu-classroom in IRC, and you can additionally follow my keystrokes in the examples by joining a shared Byobu session on an instance I run in Amazon EC2.

I will show you how to install, configure, and run a couple of web applications that I've packaged for Ubuntu, as well as some first steps to writing and perhaps even packaging your own!

:-Dustin

Sunday, October 10, 2010

What's better than Cloud 9? Cloud 10!

Get it while you can:


Try Ubuntu 10.10 Server in the Cloud, entirely on our dime!

:-Dustin

Friday, October 8, 2010

Brand Refresh of manpages.ubuntu.com


With the great assistance of my colleagues Stuart Metcalfe and Matthew Nuzum, we have rolled out a new revision of manpages.ubuntu.com featuring the updated Ubuntu website theme and color scheme.

Thanks guys, the site and the theme look great!

:-Dustin

Thursday, October 7, 2010

Try Ubuntu Server in the Cloud on our Dime!

in the Cloud

At the Lucid Release Party in Austin, Texas, I bought a round of beer, and I remarked that for the price of a pint of the local micro-brew (about $5 at this particular pub), I could have bought everyone in the pub an hour of Ubuntu Server run time in the cloud. At $0.10/hour, we could have launched 50 instances, and spent part of the release party test-driving the new server release. I mentioned the idea to Scott Moser and Dave Walker (among others), who actually grabbed the idea and ran with it...
So we're celebrating the release of the Ubuntu 10.10.10 Server this Sunday by offering anyone with a Launchpad.net account one free hour running their own Ubuntu Server instance in Amazon's EC2 Cloud.

This is an absolutely unprecedented offer:

Canonical will foot the bill for you to try
Ubuntu Server in the Cloud!

To participate, here's what you need:
  1. An account on Launchpad.net
  2. A public/private SSH key pair
  3. Your public SSH key uploaded to your Launchpad.net account
That's it!

Our web application will launch a brand new Official Ubuntu Server Image in an m1.small instance, and insert your public SSH key into the instance. Within minutes, you will have root (sudo) in the instance. With root access, you can do pretty much anything you want within the instance! You can install applications, compile your code, host network services, poke around the filesystem, compare it to previous versions of Ubuntu or other UNIX or Linux distributions. We just ask that you abide by the Amazon Terms of Service, and the Ubuntu Code of Conduct.

Get in while you can, at:


:-Dustin