From the Canyon Edge -- :-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

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

Printfriendly