Archive for the ‘Programming’ Category

xemacs - how to use replace-regexp

Tuesday, September 9th, 2008

The documentation available is terse on how to use the replace-regexp function.  Lately I have needed to do a rather large number of complex replacement's across code.  Here are some things that I should definitely remember next time: M-x replace-regexp RET \(.*\)-safe RET \1 RET Parenthesis used for matching values for replace ...

MySQL: Find tables with a given column name

Tuesday, August 19th, 2008

To get a list of tables in mysql which have a given column name (or regex of your choosing, etc.) use the following SQL: select TABLE_NAME FROM  information_schema.COLUMNS WHERE TABLE_SCHEMA = 'dbName' and COLUMN_NAME like '%ColName%';

Perl One Liner search and replace

Wednesday, June 11th, 2008

I wanted to add this so I don't have to scour the web every time I need it: perl -p -i -e 's/oldstring/newstring/g' * This will replace all occurrences of oldstring with newstring in all of the files in your current directory. Being able to do this quickly and easily is absolutely ...

Radeon 9250 (Radeon 9200 Pro) on Ubuntu Gutsy

Monday, March 10th, 2008

I have been trying to setup a new 64 bit Quad Intel Core with a Radeon 9250 video card. My operating system of choice for this rig was going to be Ubuntu Gutsy 7.10. I have enjoyed using Gutsy in the past and saw no reason to change from ...

Ruby — returning a set of baby names

Monday, August 21st, 2006

I'm back at Ruby again and glad to be. I've got to get myself back into the inner workings of the language and what better way to start than with some good old fashion data scrubbing? This simple script below will lookup all of the baby names from ...