Excellent Ubuntu RSS Feed


I recently subscribed to
the RSS feed
Planet Ubuntu
and was very happy to see that it is a full feed, including images.

It’s hard to find good full feeds.
If I had my way, everyone would have a full feed.

The argument against them is that full feeds suck bandwidth.
The counter-argument is that if I am reading my feed and visit the page to read the full article, that is way more bandwidth then just a single full feed.

making the most of “ls”

ls” is the age-old command to list files and directories in Unix.
Over the years it has permuted and grown very functional.
At the moment, I typically use two “forks in the road” versions of ls.

The first is the “ls” that comes pre-installed in Mac OS X.
It’s the BSD version.
The second is GNU “ls“, which I install on Macs using
Darwin ports.
Ironically enough, the term “ports” there comes from BSD.

No what I want out of “ls” is the following:

  1. use colour to hilight files types (*.jpg/gif/png/bmp vs *.mp3/m4a/m4b/ogg vs *.tgz/zip/rar)
  2. show file sizes in MB (not k, not 512-byte blocks)

So this is how you do this.

Using BSD “ls“, we would set the BLOCKSIZE to 1048576 and set the environment variable CLICOLOR (not to any particular value, just ensure it exists; under csh I do “setenv CLICOLOR”).

Using GNU “ls“, we need the flags “–block-size=1MB” and “–color”.

Now when you use “ports”, GNU ls shows up as gls, so you also need to alias “ls” to be “gls“.

There, now isn’t that fun?
Throw in to the mix some favorite other flags as well as some combinations and permutations of
listing only files, only directories, and maybe all the source code around here,
and you get the bottom of my .cshrc file
(the equivalent .profile is left as an exercise for the Bash user):

if($?prompt) then
	# make ls a nice, happy thing that:
	#	(a) uses color to show different file types
	#	(b) shows file sizes in megabytes
	#CLICOLOR - makes BSD ls always list in color
	setenv CLICOLOR
	#BLOCKSIZE - used by BSD ls to determine how to print the size of files
	setenv BLOCKSIZE		1048576
	setenv LS_OPTIONS		-AsCF
	setenv LS_COLOURS		'di=1;34:ln=1;36:ex=1;35'
	if("$term" == "xterm") set term=xterm-color
	# start off using the usual 'ls' in /bin
	alias base_ls /bin/ls
	# try to use gls, if it's available
	if ( "`which gls`" !~ *'not found'* ) then
		# GNU ls is better than BSD ls in general
		alias base_ls gls
		setenv LS_OPTIONS		"-AsCF --block-size=1MB --color"
	alias ls		base_ls ${LS_OPTIONS}
	alias ll		'base_ls -al'
	alias ls		'base_ls ${LS_OPTIONS}'
	alias ls.		"find . \!* -name '.[a-z]*' -maxdepth 1 -print0 | perl -p0 -e 's#^\./##;' | xargs -0 base_ls -da ${LS_OPTIONS}"
	alias lsd		"find . \!* -type d \! -name '.*' -maxdepth 1 -print0 | perl -p0 -e 's#^\./##;' | xargs -0 base_ls -d ${LS_OPTIONS}"
	alias lsf		"find . \!* -type f \! -name '.*' -maxdepth 1 -print0 | perl -p0 -e 's#^\./##;' | xargs -0 base_ls -d ${LS_OPTIONS}"
	alias lsfa		"find . \!* -type f               -maxdepth 1 -print0 | perl -p0 -e 's#^\./##;' | xargs -0 base_ls -Ad ${LS_OPTIONS}"
	alias lss		'base_ls -a ${LS_OPTIONS} \!* {,*/,*/*/}*.{h,cc,c,cpp,cxx,hxx,hpp,m,mm,py,rb,sh}'
	alias zappaths	rm ~/.cshpaths

We won’t even mantion that I sometimes run across versions of find that do not grok “-maxdepth”..

WolfKing gaming key..pad

WolfKing keypad
click for larger pic

Iain pointed out
an article on ExtremeTech
that talks about this thing called the WolfKing.

It’s designed for first-person-shooters (FPS’s), where you use the q-w-e/a-s-d/z-x-c section of the keyboard a lot.

Personally, *I* use ‘q’ for move left and ‘e’ for move right, but there are many (most I think) who use ‘a’ and ‘d’ instead.

If they were smart, they would just make this thing a USB hub, so you can plug your keyboard into it and then plug it into the computer,
all without using up another USB port.
Don’t know if that’s what they did though.

Canada on Rails conference in Vancouver, Apr 13-14

Canada on Rails
conference takes place Apr 13-14 in Vancouver.
Until I saw where it was I was thinking of going.
But Vancouver, well that’s a bit too far.
Maybe Ottawa, or Montréal; but not *Vancouver*.


Thanks to their page, I found out about a
Rails podcast.
I will have to listen and see what it’s like.

Right now I am trying to get Rails running under IIS 5, which is proving a challenge.
Fortunately there are a few pages
like this one
that help.

Copying directory structures

Quick Q&A, stolen from an AIM conversation..

Do you know a way to duplicate a folder structure, but leave out any files inside it?

It would be based on “find <dir> -type d“, which prints out a list of all directories.
From that you can use “xargs“. Something like this..

cd srcdir; find . -type d \! -name . -print0 | (cd dest; xargs -0 mkdir)

The “\! -name .” is because find always returns “.”, which is the current directory. To give feedback, add a “-v” after the mkdir:

cd srcdir; find . -type d \! -name . -print0 | (cd dest; xargs -0 mkdir -v)

Free Ubuntu CD’s

I’ve just ordered over a dozen CD’s from shipit.ubuntu.com.
This didn’t cost me anything, not even for shipping.
I plan on giving them out, probably some at Friday night gaming.
There are three 64-bit versions, and two PowerPC Mac versions.

I may install it on my PowerBook, since I actually do some of my work on Linux.
I’m not sure it will support my PowerBook though, since it’s such a new model.
Well, we’ll see.

mt daapd

Someone here at work recommended a package called
for serving music on a Linux box to be accessed via iTunes.

He highly recommended it, and it sounded really cool.
Here is a list of features, cribbed from the FAQ:

  • Supports the Roku SoundBridge (query/browse/index support)
  • Supports periodic rescans of the database
  • Can advertise shoutcast streams
  • Supports password-protected shares
  • Is web-configurable and managable
  • Support dynamic playlists, like iTunes “Smart playlists”
  • Probably other things I’ve forgotten

All is not perfect, however. Currently, there are several drawbacks to it:

  • database is indexed by inode, so all music must be on one filesystem
  • browse by artist is slow on Roku, times out (with large databases ~10K songs)
  • Probably other things I’ve forgotten

Linux rpm repositories

I may be trying a Debian-based distro next, Ubuntu, but I ran across this repository of rpm files for Fedora Core that I thought I would share. Livna has a good set of rpm files and integrates with Fedora’s “yum”.

I just installed native ATi drivers by typing:

yes y | yum install kernel-module-fglrx-`uname -r`

Up to now I’ve always used atrpms.net,
which gives Fedora a nice Debian feel by using apt.