Neat Color-Coded `svn status` Wrapper Script

A few days ago, I found a handy script online that colorized the output of SVN status. It worked pretty well, but needed a little polish and a couple of tweaks to make it use more common Python idioms. Also, I fixed ANSI word-wrapping issues, created a configurable tab expansion feature (for better code alignment), added the 'colorizedSubcommands' sequence so that only applicable commands get colorized, and fixed subprocess calls so that piping through less will work (for example, try svn-color diff | less -r to see colorized diff output).

I hope you find my modifications useful. You can modify the colors used by looking up the ANSI color codes for your preferred color scheme and editing the 'statusColors' dictionary. Here's a useful reference for ANSI color values:

http://www.ibm.com/developerworks/linux/library/l-tip-prompt/colortable.gif

i've posted the code on snipplr, and it's also posted below after the break.

modu version 1.0 released!!!

After two years of continual development, documentation, and production use, I've arbitrarily decided to tag modu with a version 1.0, as well as make a formal release.

modu is released under the MIT license. For installation instructions, see Installation or the included INSTALL file.

Tar package

md5sum: 33242ce8c2a3c6292aca46ee563e431b

MySQLs mangled syntax handling and INNER JOINs

As my DBA skills have progressed over the years, I'm always impressed and upset to see the extent to which MySQL has allowed me to use terrible syntax generally not accepted by standards-compliant SQL servers.

A recent one really blew me away, because it exposed a lack of understanding on my part about how to understand the syntax of JOIN commands.

This is how I always built nested JOIN queries. The premise is that semantically you are always selecting from a single table; the use of the INNER JOIN statement is treated like a function that returns a compound table.

Camp MMW Rocked My Face Off

It's been two days since I returned from Camp MMW, and I still feel like I haven't returned to reality yet. The experience was kind of like joining Fight Club — everything at work has had the volume turned down.

When I was first accepted, I wasn't really sure I was going to go. I had been amassing a decent-sized pile of debt, and I wasn't sure if it would be wise to get that much deeper, but conversations with friends and family convinced me that this was a once-in-a-lifetime opportunity, and besides, "when was the last time you took a vacation?"

japh

$Z=sub{for($Z=0;$Z<@_;$Z++){$z=oct("$_[$Z++]")."$_[$Z++]".$_[$Z];for($W=0;
$W<length($z);$W++){($n,$N)=split(m--,substr($z,$W,2));$W++;$X=int($n);
push(@V,split(m++,${N}x${X}));}}for($W=0;$W<@V/3;$W++){$_=chr(int($V[$W].
$V[$W+055].$V[$W+0x5A]));$_=~tr,a-zA-Z,n-za-mN-ZA-M,;print $_;}};$Z->(10016,0x460,
4120,6046,0x1810,3110,15706,0x83e,1130,2437,0xb5e,2110,2447,0x456,1213,6050,0x456,
3411,2613,0x840,1321,1763,0x7db,1910,2151,0x584,1312,1771,0x715,1714,2130,0x77a,
2112,3256,0x4ba,1411,7032,0x5ef,1718,2142,0x6af,1812,2442,0x6b0,1417);

make a free noise here

A recent jam with the yet to be actively named CWC.

NOT FOR THE FAINT OF HEART, PREGNANT WOMEN OR SMALL CHILDREN. MAY CAUSE LOWER INTESTINAL DISCOMFORT, MILD ARRHYTHMIA, COCHLEAR BLEEDING, AND/OR SWIMMER'S EAR.

64-bit MySQL and DBD::mysql Woes

I was attempting to install DBD::mysql today, and I ran into a fiendishly difficult problem.

I've installed the mysql drivers for Perl countless times, but this time for some reason, I was getting the following error:

ool-4577f347:~/.cpan/build/DBD-mysql-4.004 root# make
cc -c -I/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBI -I/usr/local/mysql/include -Os -arch ppc64 -fno-common -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -Os -DVERSION=\"4.004\" -DXS_VERSION=\"4.004\" "-I/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE" dbdimp.c
dbdimp.c: In function 'mysql_dr_connect':
dbdimp.c:1565: error: 'ulong' undeclared (first use in this function)
dbdimp.c:1565: error: (Each undeclared identifier is reported only once
dbdimp.c:1565: error: for each function it appears in.)
dbdimp.c:1565: error: parse error before numeric constant
dbdimp.c:1567: error: parse error before numeric constant
dbdimp.c:1681: error: parse error before numeric constant
make: *** [dbdimp.o] Error 1

Fun with Xargs on Mac OS X

This is something I wrote over at DocForge, but I'm keeping it here for posterity. You never know what those crazy wiki-ers might do with it over there ;-)

I've got a directory full of eBooks in the godawful Microsoft .lit format. I had marked with the Finder labels the ones I've already read, and wanted to convert all the ones I hadn't read yet into a readable format.

After using the Spotlight UNIX tools and applying liberal amounts of command-line trickery, the end result was a rather beautiful pipeline, if I do say so myself.

Be a Composer In Three Easy Steps

This is a paper I wrote at some point during my Master's work. I think I had to do it because I kept forgetting to go to class, but I don't remember putting this much effort into it. It does a decent job of describing how it felt to finally break through various mental blocks about songwriting and composition.

[most emphasis is non-essential]

The compositional process has always been a difficult subject for me to adequately understand. For a long time I put forth a lot of effort to make my style of writing fit into a particular mold, only to be disappointed with the results. For an equally long time I had an idea of the kind of music I wanted to write, but I couldn't find the right method or approach to create this sound I heard.

This diatribe is a way for me to document the various discoveries I made as I began to develop my writing. Some of these things are really "well, duh..." kind of discoveries, but for me they are a way of simplifying important concepts that I find easy to forget.

Concerts I Have Seen

The criteria I'll use to dictate whether or not to list something would involve how much of an impact the show made on me. In the case of opening acts, if I remember their name and music, I'll list them. I couldn't possibly cover all the smaller shows I've seen, so I'm not even going to count shows by my peers and so forth.

Syndicate content