Some handy bash commands

On Linux shells, I always feel pretty crummy about getting around quickly via cd. So, in the spirit of Daniel's up command, here's a few other quick-directory commands to add to your .bashrc:
# up somesubdir# Find a directory below this that matches the word provided#   (locate-based) function down() {    dir=""    if [ -z "$1" ]; then        dir=.    fi    dir=$(locate -n 1 -r $PWD.*/$1$)    cd "$dir";}# cdd someglobaldir# quickly change to a directory anywhere that matches  the word you typed.#    best if your locatedb is in good shapefunction cdd() {    dir=""    if [ -z "$1" ]; then        dir=.    fi    dir=$(locate -n 1 -r $1$)    cd "$dir";}
 
Other variations that I tried:
# Not breadth-first, so less fun sometimes function down2() {     dir=""     if [ -z "$1" ]; then         dir=.     fi     dir=$(find . -type d -iname $1 | head -n 1)     cd "$dir";  }  # Breadth-first, but really slow function down3() {         # create a list of all directories in the current folder         dirlist=( $(find . -maxdepth 1 -type d) )         dirlist=( ${dirlist[@]:1} )             # exclude .          # loop through the list         while [ $dirlist ]         do                 # check the head of the list to see if it matches needle                 val=${dirlist[0]}                 found=`expr match "$val" ".*$1.*"`                 if [ $found -gt 0 ]; then                         # change dirs, we found the first match                         cd "$val";                         break    # done                 else                         # not found!                         # scan that new directory for subdirs                         appendlist=( $(find $val -maxdepth 1 -type d) )                         appendlist=( ${appendlist[@]:1} )    # exclude .                         # add those subdirs to the tail of the dirlist                         dirlist=( ${dirlist[@]:1} ${appendlist[@]} )                          # rinse, repeat                 fi         done  }

Using Second Life to create movies

Here's a silly video I created for a contest at work:
     http://youdeliver.citrix.com/Play/tabid/79/pid/1112/Default.aspx

Feel free to vote for it, because the top submissions get an iPhone. 

Tools used:

I must have spent 15-20 hours on that video, primarily on sound effects. While working on this, I discovered that sound effects are very essential, but if they're good no one will really notice them. I.e., making something look and feel natural is a lot harder than it looks and isn't appreciated unless there are no sound effects.

If you notice, Helen's voice is distorted in a way as to make it sound as if she's coming through a digital line. My voice is distorted to reflect the environment I'm in, there are environment sounds like splashes and vehicles, etc. This all required a lot of work, but you can barely 'notice' it while watching the video. You just expect these things to be present.

Second Life is a great tool for creating the stage and environment. Inside its interface, I used existing Second Life places (e.g. the Midgar Final Fantasy Island) and dynamically created iPhone look-alikes (see if you can spot it). I also adapted an in-game laptop to display a fake webpage, and created a weird/fake server rack on the fly. I only scratched the surface, but you really can create just about any environment you imagine. This can be very helpful for fun videos.

I can't harp on Sony Vegas enough-- that tool is wonderful. I happen to have the $50 home version of the tool, but it's possible to get effect and codec plugins from the professional version and they work there, too. (The primary limitation being 3-4 video tracks, and 3-4 audio tracks, which I've always worked around. Professional versions allow unlimited tracks, I believe.) With Vegas, I was able to create overlays, manage sound effects, apply video rendering effects, pan/zoom, etc. If you enjoy video editing, I highly recommend it. I studied video editing in school for a few years (winning best editor awards, even), and I'm in awe of how far digital editing has come. I'm ten times more productive with this software than with a top-of-the-line editing deck from 8-10 years ago.

 

EventScripts Software "Box"

Over on digg recently I also saw a tutorial for creating a fake software box using Photoshop. I don't use Photoshop, but I do use Paint.NET. So I decided to try the same thing using that tool, which is one of my favorite free tools.

There are a few features different from Photoshop, so it wasn't 100% trivial to do, but I did manage to emulate it pretty well. I may write a similar tutorial for Paint.NET users to follow. Take a look:

Media_httpmattienetimagesesbox2png_cqqapxyfaqgdsne
 

Why I can't listen to Soul Coughing anymore

It seems there are a lot of things in this world that you ignore for years. Yet, once you discover them, they come full force and you aren't able to ignore it at all anymore.

This happened to me while listening to Soul Coughing one day. (Stop reading if you don't want to potentially affect your enjoyment of their music.) I discovered that nearly every single time Mike Doughty (lead singer) sings a sentence that ends in a consonant, he ends it with a very audible "uhhh" suffix. For example, this turns "Unmarked Helicopters" into "Unmarked HelicoptersUHHH".

This realization has quite tainted my enjoyment. Now it's very difficult for me not to notice it, making me unable to casually listen to their music.

Perhaps no one else runs into quirks like this and I'm just losing my mind; either way I thought I'd share.

In which Mattie links the PureText clipboard tool

PureText is a simple little tool that could save me hours of my life. I searched for it today before I began to write such a tool for the third time. Here's a summary by the author (the guy who writes DependencyWalker):

PureText is basically equivalent to opening Notepad, doing a PASTE, followed by a SELECT-ALL, and then a COPY.  The benefit of PureText is performing all these actions with a single Hot-Key and having the result pasted into the current window automatically.

Basically, this describes what I do about 5-30 times a day. I grab something formatted and want to paste it into another document or email, but I rarely want to keep the formatting. Before this tool, I copied the text to the clipboard, then I hit this arcane sequence of keys: WindowsKey-N (my Notepad hotkey), Ctrl-V, Ctrl-A, Ctrl-C, Alt-F, x. Now that I've bound this tool to WindowsKey-Q, I've shortened 6 keystrokes (with slight delays) to 1 immediate keystroke.

It may seem silly, but it's worth it for me.