I love the flexibilty that git provides, and the way it fits into distributed development.  That’s the only reason I’ve been able to tolerate the hackery that is known as msysgit, the “official” Git release for Windows.

msysgit basically dumps an entire linux distribution on your Windows box when you install – ported versions of perl, vim, bash, it’s all there, just to wipe msysgit’s butt.  What a mess.  Imagine if every port was done this way.  But we’re stuck with it for now, so let’s get it working.  Which.  Isn’t.  Easy.  Especially when it comes to setting up an editor for commit messages when using a batch file script.

There are alternatives.  You can right-click on a folder and run a “Git Bash” from that location, which is hacked together to work well enough.  VIM will kick in to let you edit your commit messages.  And there are writeups on getting Windows Powershell to get along with msysgit.  But I want to use git from simple Windows batch files.

To do so, I had to do the following:

  • Install notepad++, a nice reliable simple Windows editor.
  • Set up a batch file to run notepad++ – make sure that the batch file does not have any spaces in the path to it – I named mine [c:\short\npp.bat]:
    #!/bin/sh
    "C:/Michae~1/System~1/npp/notepad++.exe" -multiInst "$*"
  • Note that I used short names in the notepad++ path to avoid spaces.  I also found that a single quote in the path will screw up msysgit.
  • Now in a batch file, you should be able to set EDITOR to use it:
    set EDITOR=C:/short/npp.bat
    git commit -a
  • You can now set the editor up for use in the msysgit bash prompt as follows, it doesn’t seem to interfere with the batch setup (for SOME strange reason):
    git config --global core.editor C:/short/npp.bat

Without ALL of these steps, it just won’t work.

Ampache is basically a webservice that will remotely serve up the media on your mediacenter. This is a fundamental component of my long-term plans for world domination (or rather world subterfugation). You can play your music (yes, ALL of your music) through a browser once you have ampache set up. It’s a typical LAMP setup and takes about 10 seconds if you’re familiar with LAMP.

The “nice” linux client is supposed to be Amarok. Now, I am grateful that a nice client exists. And Ampache is the best thing since the best thing since sliced bread. But when developers don’t follow the Good Rules and intentionally create difficult installation situations for everyone, it really pisses me off. Here’s a quick cheatsheet to get you (me) through the bullshit:

  • Edit [/etc/mysql/my.cnf]
# Comment out this line so that mysql allows connections other than from localhost (ie so you can connect from your LAN).
# I DO NOT appreciate having to do this and you should make sure you follow up with solid firewall rules.
# But Amarok wants direct access to your LAN's db server, so there you have it.
#bind-address				= 127.0.0.1
  • Set up a mysql amarok user and database in standard mysql fashion.  Make sure the user has full remote access (not just from localhost).
  • Now run ampache. This is just weird, but just do it. Ampache starts off fine for web acccess but to allow clients like Amarok to connect you have to add some ACL bullshit – it starts off totally locked down and disabled. Ampache->log in as admin->Admin tab->Show ACL’s->Add API/RPC Host->Add an entry. Use any name you want, make sure you pick RPC + ALL, and put in a start/end that matches your LAN IP range. Click Create ACL and three weird entries will be created for you. WHATEVER.
  • Start amarok for the first time. It will fail because you don’t have a database set up yet. Settings->Configure Amarok->Database->Fill it out! It should work now that you opened up mysql in the first step. Then you’ll have to shut it down and restart.
  • With a little luck you’ll finally be able to play some music.

Spamassassin had a bug with rule handling on 2010 dates, assigning 3 spam points for valid email dates erroneously marked as “grossly old”. I bumped up the whole server (gentoo makes it soooo easy), but mysql whined that my gcc was too old. A little investigating, and it turns out you have to run [gcc-config] to tell gentoo to start using the newer version.

I’ve been dual-booted into Windoze for some gaming, and it just wasn’t right without synergy letting me slide over to the Macbook to get some work done while waiting for those wonderful Windows progress bars.  It took a little futzing to get synergy working right. Basic steps I took before it worked for me:

  • Set a good hostname on the MBP using [sudo scutil –set HostName myhostname], and reboot to keep you honest
  • Set up a good hostname for your W7 box
  • In fact, make sure you have your network configured properly, including static IP’s and good hostnames for all your machines
    • On your router, use MAC addresses with DHCP to assign static IP’s automatically, to really do this right
    • Make sure each box has IP/hostnames set up in hosts files ([/etc/hosts] on OSX, [%SystemRoot%\System32\drivers\etc\hosts] on W7)
  • Make sure you can ping between the W7 box and MBP box using your nice clean hostnames
  • Install synergy on W7, and set up the shortcut to run it as administrator, in Windows XP SP3 compatibility mode
  • Configure the synergy server on W7 with the MBP and W7 hostnames
  • Do NOT autostart synergy when computer starts – Windows 7 apparently doesn’t allow desktop interaction from services? – set it up to run on login
  • Start the server manually on W7
  • On the MBP, download synergy into the appropriate location (somewhere under /Applications, in my case)
  • Start up the synergy client on the MBP as follows (/me <3 screen!) : [screen -S synergy_client -d -m ./synergyc -n mbp_name -f w7_name]
  • Once it works, you can convert the synergy client script to [start_synergy.command] so you can double-click it in Finder
  • Then, you can put [do shell script “~/scripts/start_synergy.command”] into the AppleScript editor, save it as an “Application”, and drag the app to the dock for quick clicking.  Whoop!

It’s not perfect yet, sometimes I have to use [screen -r] to see what’s going on, and occasionally clean up multiple versions if I click the dock icon twice or whatever.  But synergy is soooo comfy and nice!  :>

This toolkit was written by a guy down the road over in Chapel Hill, it seems. The idea seems to be to generate and configure MVC-structured PHP code with RESTful web access. Supports multiple apps with one installation. Works for me.

I grabbed the 0.20 release. It comes with a web-based front end that will mock up your initial application code. Unfortunately the javascript wasn’t working and it looked like it had a bad path to the embedded jquery library. Rather than kill myself researching, I switched to the git “edge” branch:

cd development/git
git clone http://github.com/recess/recess.git
  Initialized empty Git repository in /home/m/development/git/recess/.git/
git checkout master 
  Already on 'master'

Now it seems to be able to find its css and javascript.

Next problem was with mod_rewrite. It just wouldn’t work. Time to troubleshoot… and fixed. In Recess’ defense, this was probably the reason the 0.20 release didn’t work well.

Next, I went to create an app. I had to change the permissions on the apps directory, as instructed, since I unzipped recess under a group for which apache did not have write access.

Next, I cranked through a model for one of my apps. WOW, now I have a full set of “routes”, URL’s with which to RESTfully access my model. This is looking nice… to be continued…