Wednesday, July 29, 2009

Vim Non-Greedy Search

Just a self-post here to help serve as a reminder that the non-greedy search operator for vim is .\{-} instead of the .*? in most languages. This was useful when attempting to replace bad image paths for a template file that contained lots of images that were hosted on various servers and I wanted to consolidate them to get around security warnings. The search command string in vim then ends up as:
:/src=\".\{-}\.\(gif\|png\|jpg\)\"/
This can be combined with a search and replace command as:
:%s/src=\".*\(\/.\{-}\.\(gif\|png\|jpg\)\)\"/src=\"myimagelocation\1\"/gc
Oh, and a super nice thing to know is that you can copy and paste from the cmd line in vim by hitting ctrl-f to open a new cmd window. This is great for saving thost extremely wordy vim regexes that you need to type over and over.

Monday, April 13, 2009

Wednesday, February 04, 2009

I need to learn Vim

Today I stripped out lines not containing a certain string, removed all text but the codes I cared about from every line, sorted the remaining lines while removing duplicate lines and it only took 3 commands.

In short, I need to learn Vim.

Monday, December 22, 2008

8-bit Holiday Cheer

Love 8-bit NES-style music? Love Christmas tunes? Well, in another Reese's moment, you just got your 8-bit in my holiday cheer.
Just in time for Christmas, it’s the full version of 8-Bit Jesus: Classic Christmas Songs in the Style of Classic NES Games. This full release contains 18 tracks total, including improved variations of a few of the original nine!
[DoctorOctoroc.com]

Wednesday, December 10, 2008

Selling 32GB 1G iTouch

Anyone looking to pick up a slightly dropped 32 GB 1st generation iTouch? I'm going to post it on eBay if no one's interested.

Wednesday, December 03, 2008

Ever have one of those days...

... where after talking to a friend at lunch you go back and listen to the first album your band ever recorded and you think, "I'd sure like to get the band back together!"?

Yeah, me too.

Tuesday, November 18, 2008

Star Trek

Wasn't that excited about this until I saw the 2nd trailer!
http://ping.fm/pFJKi

Thursday, September 18, 2008

Outlook 2007 Search and RDS Ctrl-Alt-End

I don't know why this is so hard for me to remember, but maybe blogging about it will help.

Searching a date range in Outlook 2007 can be accomplished with the following syntax:
received d:(>=08/01/2008) received:(<=08/31/2008)

Sending a ctrl-alt-delete key combination to the machine you are remoting into is accomplished by pressing ctrl-alt-end.

Quiz me later!