Posts

Whoo-hoo New Laptop

I am finally going to upgrade trusty 8200 Dell Inspiron laptop.   I bought it back in 2002 or 2003 and thanks to maximizing the RAM and Linux I've been able to use it for years.  I'm going to miss the 15" 1600x1200 screen that it had. Thanks to HD TV high resolution screens are a thing of the past, and getting high resolution on a small (~15") screen is all but impossible ( HDTV Ruined LCDs ).  However, I did manage to find the Dell Studio 16 XPS with 1920x1080 resolution. Ordered components for new laptop 1 224-6716 Studio XPS 16 Notebook 1 317-2361 Intel Core i7 720QM 1.6GHz (2.8 GHz Turbo Mode, 6MB Cache) 1 317-2366 8GB, DDR3, 1333MHz 2 Dimm 1 320-8330 15.6 inch Wide Screen 16:9 1080p Full HD WLED LCD, W/2.0 MP, XPS 1645 1 421-1010 Dell Webcam Central v1.4 1 421-0188 Facial Recognition 1 320-8350 ATI Mobility RADEON HD 4670 1GB 1 330-5460 DELL RESOURCE DVD,BACK-UP,XPS 1645 1 341-8989 500GB 7200RPM Free Fall SensorSeagate Hard Drive 1 320-8351 ...

subversion and revision tags, first pass

Always being a wanna-be programmer, I'm only now learning development tools. Subversion is cool in itself, but when I was just starting with it a few months ago I wasn't googling tags correctly and only found parts about how cvs tags didn't work. Inspired today, I decided to search again and found the right information this time. For me a compressed tag with date, rev #, and id are good enough.  So all I had to do to get this working was to add a line in my PERL script under a comment: $Id$ and then change the svn property for the affected files with: svn propset svn:keywords Id lib/* now when I commit files, they automatically get updated with the latest tag. There are other more useful settings but this was my little discovery for today.  Since I'm forced to work under winblows and that means I have to use Cygwin to be productive at all, I haven't explored how to make this the default yet.

Decoding a bad attachment -- base64

The team captain for one of my hockey teams sent out the playoff schedule.  Unfortunately whatever method he used to forward the message, attached the original message in a raw mbox format.  Because it contained an attached m$ word document, it arrived at my Gmail inbox in base64 MIME format and Goggle didn't parse the attachment. Luckily, openssl has base64 encoding built in and with a little massaging I was able to decode the playoff schedule. First, save the raw attachment.  Delete all the lines before the actual base64 code.  Delete all of the lines after the base64 code.  Hint: don't even save the base64 header information. Next, tell openssl to decode that file: openssl base64 -d -in srcfile -out sched.doc

syslog-ng on cygwin

I am developing some PERL scripts for OMNIbus/Netcool at work.  Because my company restricts freedom and discourages innovation, we are stuck on Microsoft.  Luckily they haven't locked us down to the point where we can not install new software.   So I've become a big fan of Cygwin.  I've never used heroin, but I suspect my use of Cygwin is much like an addict's use of Methadone.  It keeps me alive, just barely. Anyway, this piece of knowledge was not the most straightforward piece to find, or I'm just an idiot (not that those are mutually exclusive.)  However on the winblows box, syslong-ng runs under Cygwin and even sets itself up as a service which is cool. Side Note:  if you want to upgrade Cygwin and are getting file in use problems and are running syslog-ng, you probably need to shutdown the service during upgrades. Anyway, marking and statistics in /var/log/messages on winblows are pointless and just consume disk space.   Normal goo...

Fonts in M$ Outlook

I always have a heck of a time getting M$ to do what I want.   I guess because I am not a "defaults" kind of person.  Black text on a white background is gross.   Anyway Word has always had a wordperfect setting where I can get white text on a blue background.  Not as nice as a black background, but better than white. Unfortunately, many people send HTML emails and when replying I have to edit in HTML mode to preserve any kind of useful chain.  Up until today I've had a problem that eluded me.  Many times my initial typing would all be hidden because (I assume) the text color matched the background color.  Now this only happened with HTML replies.  I had to highlight my text, and click the Text Color (Auto) button to correct. The solution was not straightforward to me, but I found it today: (in Outlook) Tools->Options->Mail Format->Fonts These fonts are used and override (or interfere) with the blue background/ white text glo...

xargs always confuses me

I have always had the hardest time working with xargs.  I usually end up with a bash foreach loop and some backticks instead.  But it really is cleaner to be able to specify a pipe from the generating command. I had a situation recently where I had added some code to a PERL script that I was trying to understand.  I added some File::Temp code to dump incoming variables and the current environment.  I just used /tmp as my template directory since it was always guaranteed to be there and I didn't want to have even more code to create and maintain a new sub-directory.  Wow, that is lazy.  Anyway, I ended up with a bunch of /tmp/?????????? files, so I needed a quick way to grab all my files from temp and move them to a sub-directory for review.  xargs was the perfect solution here, AND (drum roll) I actually got it to do what I needed it to do: cd /tmp/1 mkdir /tmp/1 fgrep -l dudeatwork.cgi ?????????? | xargs -I {} mv {} 1 which looks at all the files...

Google Reader and OPML

I am a big fan of indeed.com and its job search aggregation functions.  I usually keep RSS links in my Google reader profile.  I like to search based on geography and I use a number of keyword searches.  Once you get to more than a couple of jobs links, updating them can be a bit tedious.  But luckily Google has a nice way to Import and Export through  OPML formatted files.  I am no expert on OPML, but using an export of my current RSS feeds I was able to piece together a quick and dirty little PERL script to generate a batch of update RSS feeds.  This script is really basic, I just hard coded the input strings and locations, but for 5 minutes it did the job fine. I merged the output of this script to the downloaded OPML file from Google Reader and then reimported. Due to how the blog interprets stuff, I had to add some backslashes, which need to be removed before this will actually work. Basically you need to s/<\\/ --------CODE BEGIN----- #...