June 2008

LSCOLORS/LS_COLORS: Now with Linux Support

A while back I made a little web page to spruce up ls output. Of course I completely forgot about it until recently. Some of Ubuntu’s default colors were hard to see in Terminal.app, so I added mostly-working LS_COLORS for Linux. The string format is completely different, and harder to go from text to preview, so I ditched that feature. Linux people will have to copy-paste the color string and type ls in their terminals. Life’s tough, I know.

Anyway, try it out.

Once you’ve got a theme you like, try the following for BSD/OS X:

LSCOLORS="exfxcxdxbxegedabagacad"
export LSCOLORS
alias ls="ls -G"

or on Linux:

LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:"
export LS_COLORS
alias ls="ls --color"

Apparently just setting an environment variable called LS_COLORS doesn’t mean you actually want ls to print in color. You have to set up the aliases as well. Add the lines above to ~/.bash_profile (or .profile if you’re a ksh user) to make the change permanent.

One thing I learned: Linux’s color string is much more powerful than BSD’s. Linux’s ls lets you choose more colors, blinking text, and backwards text. It even lets you specify color settings for specific file extensions in addition to general types of files. Support for all those extra features will have to wait until forever. I use color information sparingly. Too many colors is just as useless as no color. If you want to get fancy, this guy has some helpful info.

Computers

Comments (3)

Permalink

2,000 Miles on a Ninja 250

A few weeks ago I rode my Ninja 250 from San Jose, CA to Spokane, WA and back, averaging just over 500 miles a day. The gallery of photos is here. The trip was a ton of fun, although by the second day each way I was a little sore. I should have stopped more often, because there was a lot more scenery than the pictures suggest. It rained a couple of times so I didn’t get any shots from some parts of the trip. On the bright side the rain cleaned all the bug guts off my gear.

Highlights:

Welcome to Oregon


Eastern Oregon


Danger to manifold!


Bugs really like my visor.

Most of the shots are from the return trip, since I had an onboard camera mounted. The onboard camera is pretty cool, but I need to work some kinks out. The mount and the camera body itself aren’t very stiff, so it shakes while recording video. Here’s a clip to illustrate:

After I got the camera recording in HD and in daylight the quality was better but the shakiness was worse:

Videos
Vroom

Comments (4)

Permalink

Thermite

I finally got around to uploading pictures of the thermite from last year. Here’s the gallery.

Highlights:
Ignition!
T plus 2 seconds

Miscellaneous

Comments (0)

Permalink

Marathon

I finished my first marathon, the San Diego Rock and Roll Marathon. My time was 3:18:00, which isn’t bad considering my longest run before the marathon was 18 miles. For most of the run I stuck with the fastest guy in an Elvis costume, who was pacing for 3:15. The first 18 miles were a breeze. I spent time talking with people around me and enjoying the scenery. Around mile 20 things got tough, and from mile 23 to the finish all I could do was follow the guy in front of me and try not to throw up or pass out. I’m pretty sore today, but I’m definitely not the only one. I’ve seen quite a few others besides myself doing the post-marathon shuffle around San Diego.

Update: Pictures
Mile 17-ish
Must…
Mile 20-ish
…defeat…
Mile 20-ish (Again)
…Elvis.
Finish

Miscellaneous

Comments (0)

Permalink