Sunday, May 22. 2005
GAIM and Cygwin. The answer is so simple.
Gaim is a multiple IM service client, like Trillian. It however seems to be pretty good. Half the memory footprint, and free + open source. I'll post a review in about a month when the honeymoon wears off.
There is a known problem when using Gaim with Cygwin (a linux environment for windows) if you have your system path set to the Cygwin bin dirs. The documentation for gaim actually hints at the fix:
If you have a Cygwin installation (with tcl 8.4), and have added its bin directory to your PATH, then WinGaim will crash on startup. The solution is to remove cygwin's bin directory from your path. Introducing Cygwin dlls into the native win32 environment is a very bad idea, and is likely to cause problems with other programs.
The fix is simple, instead of having the Cygwin paths on your global environment table, you just want it for your shell windows. Write up a simple little batch script to modify the path like so:
@echo off set path=%PATH%;[Cygwin]\bin;[Cygwin]\usr\bin echo This is my shell of DOOOOOOOOOOOOOM!
After that, setup a shortcut to: %windir%\system32\cmd.exe /K [your batch file]. The /K switch tells cmd to keep the shell window open. Bam. Cygwin and GAIM goodness.
Update: Sometimes Gaim will half-crash on startup. It won't actually die, but it won't do anything else either. This can happen if you install something like WinAVR which uses CygWin, and it adds itself to your path. If you find Gaim crashing all of the sudden, then check out each entry in your PATH environment variable and make sure there are no cygwin dlls.Friday, May 6. 2005
One Man Jerkr Setup
Do not follow these instructions. They will kill you.
One man jerker setup is easy. I remember trying to set up my first Jerker, and how much of a disaster that was. Thanks to my friend Craig hooked me up with this technique. He also hooked me up with a second Jerker, whoooot! The cornerstone of the technique is to set it up so that the 'back' of the desk is on the floor, and then lift it up when you are done.
- First step is to get the main piece (where your keyboard probably is) perpendicular to the floor. Use a chair or something to hold it up.
- Next up is to attach the legs. This should be relatively easy. If you are having problems getting the holes to line up properly, use a flashlight to 'sight' them, and then screw em in.
- Now, attach the very top shelf (assuming you have one). This should lift the desk up enough for the next step...
- Attach the monitor (middle) shelf.
- finish off by lifting the desk up, and attaching side shelves.
Tuesday, July 6. 2004
CVSNT loginfo data from stdin
DEFAULT cmdwhere DEFAULT means the default action and cmd is the command you are sending. Dirt easy, right? You could replace DEFAULT with mymodule/subdir/subsub... to only send emails to a particular module, or ALL to send emails for EVERY module, along with any other loginfo action. See the CVSNT docs for details.
PHP is my scripting language of choice, (although there is a vast cornucopia of languages that would work nicely as well). So I just make cmd be "C:\path\to\php.exe c:\path\to\script.php %{sVv}"
The {%sVv} tells CVSNT to replace it with the current module name (i.e. mymodule/subdir/subsub) the files committed, and their previous and current versions in a format something like this:
myModule/sandbox/CommitLogTests README.txt,1.4,1.5 test.txt,1.2,1.3So with some regex and/or explosion magick, one can easily tear that apart, using PHP's builtin $argv[] variable.
CVSNT also sends a bunch of information to stdin, its format looks something like this:
Update of H:/Full/Path/Tp/CVSRepository/cvs/myModule/sandbox/CommitLogTests In directory computername:H:\\CVSTemp\\cvs-serv223a\\sandbox\\CommitLogTests Modified Files: README.txt test.txt Log Message: Test of a commitIt is a simple case of grabbing the STDIN filehandle, and read bytes till feof() is hit. After that, 'splosion and regex magick again work well. I just 'sploded and searched for "Log Message:" in the array myself.
A few pointers:
- Do: run your script through php lint (php(.exe) -l [script])
- Do: test your script by calling it directly, and redirecting a text file that has contents similar to above.
- Do NOT: blindly hook it into your live CVSNT server without giving it a good testing. You might hose things badly enough to require a service shutdown, and manual lockfile removal in your repository.
Listening to:
Breakbeat Show 7-15-02 prt 1 - Hybrid (0:-1)
Wednesday, May 26. 2004
Getting a list of changed files in CVS without updating
The answer of course is easy:
cvs -n update foo-n means "Don't change files". So you do the update, which lists the changed files (both on the repository and on your local copy) but the update isn't actually performed.
There you go. (The spellchecker didn't accept "foo"!)




