Christian Bale is a Badass

Posted about 2 years ago

With the release of the new Terminator 4 trailer:

It occurred to me and a co-worker that Christian Bale should star in every sci fi role for the next several years. Some examples:

  • Dune - the perfect Paul Atreides. He's already got the skin suit look down.

  • Blade Runner (no remake scheduled) - We felt that Ed Norton would be the perfect Deckard and Bale should play Batty. We also agreed that we'd be incredibly geeked if Ed Norton ended up as the Riddler. Following that line of thought it became obvious that Bale and Norton should star together in every movie they do.

  • Superman - since Brandon Routh is out why not? Or maybe Bale would just be a good Bizarro or Cyclops? This discussion quickly deteriorated into how much we'd like to see a Doomsday/Superman movie.

  • OK, Tobey can stay on as Spider-man. And Robert Downey can be Iron Man.

And, at the very least, he should be a "red shirt" in Star Trek Zero.

locking macintosh with a keystroke

Posted over 2 years ago

Problem

You want to lock your computer when you get up from it. You don't like hot corners for whatever reason (you're a keyboard junkie, they are used for other tasks, you are used to Win-L on Windows).

Solution

Use Quicksilver to start the screen saver application with a keystroke.

Discussion

I live in a dual world and one nice thing about Windows is you can Win-L to lock your computer when you get up from it (See here why you might want to do this).

The Macintosh solution is to first change your security preferences to "require a password to wake the computer from sleep or screen saver" (same think with the Windows screen saver).

Many people like to then set a "hot corner" to start their screen saver (screen saver preferences, hot corner button). This means you have to drag your mouse into one of the four screen corners to start the screen saver. There are two reasons why I personally don't like this:

  1. I love Quicksilver which is a launching program for Macintosh (and much more). I love my keyboard and I prefer not to use my mouse. So it makes sense for me to be able to launch the screen saver from the keyboard and Quicksilver should be able to help me do this.

  2. I run Parallels in full screen mode and for some reason the hot corners tend to be less reliable when Parallels is running.

To do this you first need Quicksilver - a quick download and easy setup will have you up and running quickly. Quick tutorial - CTRL-SPACE will open the QS launcher then you start typing in the names of apps you want to launch or control. Certain apps - like iTunes - can be controlled through QS to fine detail. Play. Have fun.

Back to this screen saver issue....

By default QS will scan your Applications directory for ... well apps to launch. You can either have it scan all applications or you can create a custom link directly to the screen saver application. I chose the latter because the former added an additional 300+ applications to the QS catalog.

Here's how:

  1. Open QS preferences.
  2. Click the catalog button on the top bar.
  3. Click the Custom button on the left sidebar.
  4. Click the + sign on the lower status bar to add a new custom catalog entry - File and Folder Scanner type.
  5. Browse to /System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app and open it.

That's it. Now I don't get all fancy with QS - I just CTRL-SPACE and type screen and this comes up for me. Easy-peasy.

deleting all subversion files from a directory

Posted over 2 years ago

OK, I've got to give Mercurial a try. In order to import the files from my local working copy (will try hg convert later) I needed to prune out my local copy.

Yes, you can use SVN export as well. But I wanted to try to delete all the files within a directory structure. Here's how to use "find" and "rm" together to remove specific directories in a directory structure:

find . -name '.svn' -type d -print0 | xargs -0 rm -rf

the "find" part of this argument will find all files in and under the current directory named ".svn" that are directories and print them out as a list. those results are piped to xargs to turn into an argument list for rm. the "r" option works through the tree recursively and the "f" option forces removal. This is necessary in order to remove folders that have files in them.

LOL Boowebb

Posted over 2 years ago

http://lolinator.com/lol/boowebb.com/

Other fun sites to LOL:

http://lolinator.com/lol/boowebb.com/hiking

http://lolinator.com/lol/en.wikipedia.org/wiki/Lolcats

http://lolinator.com/lol/www.scientology.org/

Extract Files From Subversion for Propagation

Posted over 2 years ago

Problem:

You store your site files in a subversion repository for source control. When you update your site you don't want to upload the entire tree (nor the svn working copy files) nor do you want to spend time hunting and pecking for the changed files.

Solution:

Use the following script on *nix to extract non-svn files that have recently changed:

find . -not ( -name '.svn' -type d -prune ) -not ( -name '*.log' ) -type f -mmin -240 -print | zip ~/Desktop/prop -@

Discussion:

We're building upon syntax we've used in two previous posts: delete files from a subversion sandbox and zip changed files in your subversion sandbox.

In this case we are using the "find" command combined with the -mmin option to find file modified within a specified number of minutes. find . -mmin -X will find files in the current directory structure modified in the last X minutes. find . -mmin X will find files in the current directory structure modified before X minutes ago.

In the example above we're findiing all files not in .svn folders modified less than 240 minutes ago. We pipe the results of that find to the zip utility to zip up the results. We are also filtering out the Rails-specific "development.log" from being zipped.

If you want to propagate an entire directory structure you can use svn export on your working copy to extract out all your files (this is the same as a checkout without the .svn folders). You can also svn export from the repository to pull a specific revision or branch.

svn export . ~/Desktop/prop
svn export http://repos/project/tags/release_1.0 ~/Desktop/prop

And for those Rails developers you can obviously use Capistrano to get around most of these issues.

Delete All Files in a Subversion Working Copy

Posted over 2 years ago

Problem:

You want to remove all the files in your subversion working copy but you do not want to remove the folder structure.

Description:

I have had to do this when upgrading an application from Rails 1.x to Rails 2.0. The file structure of my project changed significantly enough that I just moved everything out to a non-working copy to do the work. When I started to move the work back in there were a lot of files/folders that had changed.

Rather than work through the manual process of moving files in svn it's sometimes easier to just start from a new point in time within the same repository. In that case you want to:

  1. remove all the files in your current working copy yet preserve the folder structure for SVN
  2. move all the new files into your working copy and commit those changes
  3. clean up any new/missing files and folders.

Solution:

*nix

From the command line run:

find . -not \( -name '.svn' -type d -prune \) -type f -print | xargs rm 

This says....

find from the current directory (find .)
...ignoring files in a directory called '.svn' (-not ( -name '.svn' -type d -prune ))
...any file (-type f)
...and delete it (-print lists the files and xargs rm removes any file in that list)

oddly enough the following _will_ list out the same as above...

find . -type d -name '.svn' -prune -o -type f -print
but -delete is invoked with -depth implied so you will end up deleting required svn files if you run

find . -type d -name '.svn' -prune -o -type f -print

Windows

This is easier from the UI with your favorite search tool. I use Directory Opus so from the advanced tab specify Location to not match .svn and type matches files only.

Any other good ideas for this on Windows?

The Definition of "Ballsy"

Posted over 2 years ago

http://www.google.com/microsoft.html

Easily Zip Changed Files in Your Subversion Working Copy

Posted over 2 years ago

Subversion is a great tool for source control on a team of software developers. Every check-in we do into subversion must be accompanied by a code review from a fellow developer. The best method for doing this is to send the modified files to another developer in zip format. But how does one do this with a large source tree?

*nix

From the command line run the following:

svn status | grep ^[AM] | awk '{print $2}' | zip ~/Desktop/cr -@

A small explanation of what's going on here:

  • this makes heavy use of piping (aka the | or "pipe" character) which sends the output of a command on the left of the pipe as input to the command on the right. as a short exampe ls -l | grep ^A will send a directory listing to grep will will then evaluate that list and parse out only those entries that start with A (which really will be none...).

  • svn status will list all files in your working copy (local sandbox) that are not in sync with the svn repository.

  • svn status returns ?, !, A, M, D for "unknown," "file missing," "added," "modified," and "deleted" respectively. it lists this info in column 1 and the file path in column 2.

  • we use grep ^[AM] to filter out the list for added and modified files only. it's a regular expression that says find matches where the line starts with A or M. this means the output of svn status | grep ^[AM] will be a list of all added and modified files in your working copy.

  • we use awk '{print $2}' to print the 2nd column front standard input. this means that svn status | grep ^[AM] | awk '{print $2}' will list the paths of each file in your svn working copy that has been added or modified.

  • zip is the most obvious command in this sequence - it builds a zip file in the location specified. the only odd option is -@ which tells zip to take the list of files to zip from standard input.

I have actually saved this to a bash script to make sure I delete any existing cr.zip.

Windows

Heaven forbid you can actually do something more easily and nearly as geeky on Windows but it's true....

This assumes you use TortoiseSVN which is a stellar program that integrates into the Windows shell.

Right-click on your trunk directory and choose TortoiseSVN => SVN Check for Modifications. This command sends svn status and returns the list to a dialog box. From here you can double-click each file for easy diff.

To zip these files up create a new zip file (on your desktop) with your zip utility of choice (aka WinRar or WinZip - as you'll see in a moment) and open the zip in your utility.

From the TortoiseSVN window select all the files you want to zip (you will have to manually unselect (or not select) deleted, missing, or non-added files which is made easier if you sort by the "text status" column) and drag them to the title bar of your zip utility. With WinRar and WinZip you get a dialog giving you options about how you want to add these files - make sure you select to add the files with full paths or when they are unzipped they'll be all at the root of the zip file.

I have not played with other zip utilities on windows outside of 7z which does give you the option to add files by full path.

Upgrading from Windows XP to Windows Vista for Free

Posted almost 3 years ago

This is amazing - who would have thought Microsoft would have allowed this backdoor....


Darth Vader calls the Emperor

Posted over 3 years ago

Hilarious.....

Oh My

Posted over 3 years ago

Star Wars Gangsta Rap - very disturbing (and funny). Check it out.

iPod Reboot

Posted almost 4 years ago

Found this little trick and need to keep this handy. I was driving along I-90 through Spokane and my video iPod got stuck moving between songs (it may not like Primus is all I can figure).

The trick is to toggle the "lock" switch to locked then unlocked and then hold the center and menu buttons simultaneously until the iPod reboots.

I also noticed as I was scrolling through songs that the letter S popped up in the display and I scrolled to the S songs.

After a bit of digging this feature is apparently new and is called "Quick Scroll." It appears that as you apply pressure to the wheel as you scroll that you can scroll through letters of the alphabet. Unfortunately I have one of the rubber guards protecting my iPod from wear and tear and so it is apparently not sensitive enough to pick this up.

There is also a new "search" function in the updated iPod software that let's you search for a song. Accessible from the main menu (or music menu) this seems quite useful.

Guess I'll have some playing to do as I drive to Whitefish, MT tomorrow.

My New Toy

Posted almost 5 years ago

Today arrive my Dell Dimension E510. I toyed with getting one of the new XPS boxes but didn't want to shell out the cash. I got the Win XP Media Center edition which is quite interesting so far (I'm not quite done installing all the advertising crap that Dell feels obliged to install for me).

The machine is super quiet - insanely quiet actually. I've got 2GB RAM with a hyperthreaded 3.4GHz CPU.

The only real problem so far is the uninstallation process. I suppose this is an ideal thought but it would be nice to get a computer with just the OS installed - damned OEM agreements.

I think I will also need to get a cable in box - we'll have to see about that. In theory this machine will act just like a ReplayTV but will have to play with that.

More later...

Look Into: My Favorite New PowerToy

Posted almost 5 years ago

My Favorite New PowerToy

This might be worth a look - I do a lot of work on multiple computers and it is hard to keep things sync'd. Will have to play with in my free time.

Vampire Hunters

Posted almost 5 years ago

In the interest of useless trivia I discovered tonight that the music to the Demolition Man trailer is from the Dracula soundtrack composed by Wojciech Kilar. The track is Vampire Hunters and is quite a dark anthem.

In a seemingly related note I was told today that I was the geekiest person that someone knew. I dispute this but really have nothing substantial to refute this claim with.

That being said I did score 45% on the geek test - this does not really put me in the scale of uber-geeks.

Sarah has also challenged me to put up my picture of our visit to the Star Trek exhibit at the Las Vegas Hilton (this qualifies I'm sure for something). I honestly like my picture with the Mark V torpedo as it has more historical significance in the Star Trek universe.



Note that Sarah is standing next to the Klingon.

One thing to remember from this visit is that they take pictures halfway through the tour. At the end they merge your picture into a Star Trek scene. I don't remember what my expression was but it sure was funny merged into the TOS bridge scene.