Creating PowerShell-based pre/post-commit hooks for VisualSVN Server

I’m setting up a testbed development landscape with the Windows Azure credits I received as part of my MSDN Subscription, and let me tell you… Microsoft is certainly on the right track. While I’ll go into the details of how pleased I am with the service another time, I’d like to focus on the concept of SVN commit hooks and how you can use them to leverage the wonderous glory that is Windows PowerShell.

I’m using VisualSVN Server for this proof-of-concept environment, which is a pretty standard and easy-to-use SVN server platform. Alongside Jenkins, an automated build platform, I hope to create a platform on Azure that we can use to quickly adapt to given situations; i.e. QA Test ramps up 2 servers to test the latest release, Developer ramps up 2 clients and a server for new feature development, maybe these servers are stood up at each release with the latest and greatest… but I digress for now I am daydreaming :-)  

So, right-clicking a repo in the VisualSVN management console and going to Properties, I’m presented with a series of “hooks”. These are spots where I can drop an executable that will be triggered upon whichever event I assign it in:

List of hooks on a VisualSVN repository

List of hooks on a VisualSVN repository

Now the first thing I want to do on the SVN server is to build out a directory where all of my hook executables can live and trigger PowerShell from. I chose C:\DATA\AutoBuild\, as I plan to use the term ‘AutoBuild’ to reference this PS behavior wherever I use it. I place two files in there, ‘PreCommitHook.cmd’ and ‘PostCommitHook.cmd’. You can guess what they’ll do, I’ll put some simple echoing in them for now to test functionality. Once they’re confirmed okay I will also add ‘PreCommit.ps1′ and ‘PostCommit.ps1′ as targets for the cmd files to execute in PowerShell. I’ll also make sure to receive the two arguments coming in from a VisualSVN hook call, which are repo path and revision #. My first hack at PostCommitHook.cmd looks like this:

@echo off
echo Initiating Post-Commit Hook
echo Repository Path: %1
echo Revision Number: %2

Just takes in the 2 arguments and spits them back out, not too exciting. Until I add the hook into PowerShell, as now the script becomes available for use. I put this immediately after the batch code above:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -c “. \”C:\DATA\AutoBuild\PostCommit.ps1\”"

Inside PostCommit.ps1, a simple indicator that we got in there okay and we’re doing alright:

# Just make sure we got in here okay

Get-Command *file* | Out-Default

All that being said, time to run the PostCommitHook.cmd to see where we stand:


YES, PowerShell output from our post-commit hook! That’s it for now, I’ll do a part 2 when time allows and link it here about going further with this hook functionality and the opportunities that arise as a result. :-)

Gobbler: Digital audio projects cataloged and sent to the cloud…!

Okay, so I’m not against pushing an app that I really have a use for, and this one is the kind of thing I didn’t even realize I needed. Gobbler is a fairly new site/app that uses a local client to gather information on ALL sorts of different music project and audio files. In the screenshot below, let’s see what’s immediately useful: ABLETON ahem, AIFF/WAV, Garage Band, Bitmaps (?), a bunch of Cakewalk stuff, and you can add your own which makes it super customizable.

Completely customizable file indexing, yes plz

Completely customizable file indexing, yes plz

So yeah, you tell Gobbler what you want backed up to their servers (5GB, not too bad for the free plan) and it just. does it. As an added bonus, it will also give you an age for each item, so instead of looking through ’4/26/2013 4:32:33 PM’ and such to find a song from a specific timeframe, now it will be easy to find the song from ’4 weeks ago’ – this is immense for me, as I have the filenaming capability of a cat walking on a keyboard…

Shut up!

Shut up!

Notice that it’s also telling me what session files reside in the Ableton project, which is again super awesome because I always accidentally save multiple projects in the same directory and hide them from myself. Even if none of this was also backing up to the cloud, I would still want it incredibly bad. I assure you this is not a paid endorsement! Just that useful. Now 5GB is going to go pretty fast as I’m guessing when it’s this easy I want to archive everything. The monthly/annual pricing below really isn’t that bad considering that with almost every other cloud backup service it could care less if you like making music (no less catalog and index it for you). For $4 a month, I could really be convinced to land a total of 20GB of space which is probably sufficient for all my real important stuff.

Monthly pricing

Monthly pricing

Gobbler Annual Pricing 20130426

Annual Pricing

So that’s that, not a huge complex review or anything and there are more features to be seen, but I just felt the need to share its existence with like-minded folks. Check it out, and leave me a comment with your input if you give it a shot!

Restore Chrome’s UI-centric right-click menu

It seems that at some point, a Chrome update suddenly changed its right-click context menu to appear as a white, padded box – which, these days, makes it appear very similar to the sorts of right-click menus that Google had started using in their apps like GMail and Docs. Well that’s silly, because now it’s hard for me to differentiate between the Windows application context menu, and one that a website hooks in that says something like ‘Save As…’ that really does something malicious (I know this is a stupid example that is probably impossible with the way Chrome sandboxes its sessions, but you get the main point). Looks like this right about now:

mahoneyTECHNOLOGY  learning and doing are the reasons - Google Chrome_2013-04-08_12-19-41


Okay, so click the link below for instructions to bring that back to OS-land if you’re as particular about these  things as I am. This is a neat interface upgrade, if it was coming from the OS guys instead!

Link: How to disable Google Chrome’s white context menu [ghacks]

Gamedev: libGDX Quick Prototype Walkthrough

First libGDX example application (Windows 8)

Just found this great tutorial series on how to quickly get a platformer scaffold running in libGDX, a game development platform based on Java that allows one codebase for Desktop/Web/Mobile and from what I’ve seen so far is pretty balanced in terms of features and freedom to go off on your own. I love the Starling framework which is the equivalent for Flash ActionScript, but Flash has always been a nuisance for me on the desktop. Part 1 linked below renders a player and block objects on-screen, with Part 2 going into animation and Part 3 into collision and jumping. Probably the best run-through of game architecture and platforming on a basic level that I have seen so far.

Link: Getting Started in [Android] Development with libGDX, Part 1 [against the grain]

MIT OpenCourseware: Space Shuttle Design Analysis Course Videos!

Concept art from early Space Shuttle design process

Concept art from early Space Shuttle design process


Oh my goodness. So I don’t know about you guys, but technical detail information about systems design is pretty interesting to me. Something about the specifics of all of the unexpected challenges that come up during a massive project is compelling, and despite the fact that we may have lost a couple during our run I think the Shuttle is still one of the most amazing things we have done as a civilization.

Some of you may already be aware of MIT’s OpenCourseware program, an initiative to provide course materials and lecture videos/info on the web for public benefit. On its own, that’s a wonderful opportunity to self-educate about a *ton* of useful subjects… however, if you’re anything like me it’s also an opportunity to be a fly on the wall for some very interesting conversations. In the case of course 16.885J, Aircraft Systems Engineering, I’ve read that each semester the students collectively choose a system and analyze it in specialized teams. In Fall 2005, the students were awesome enough to decide on the Space Shuttle and were lucky enough to get access to the very engineers that planned/designed it! SO COOL.

The link below is to a YouTube playlist with video of the entire course, 18 2-hour lectures where you’re listening to someone that was involved with the program and shares some crazy stuff about how you build part of the Space Shuttle. It’s absolutely something that you can leave in the background as audio while doing other things, at least if you’re as easily entertained by structural loads on space vehicle thermal protection systems (Lecture 5, btw) as I am. :-P

Link: MIT 16.885J Aircraft Systems Engineering, Fall 2005 [YouTube playlist]

Max for Live Tutorial Series from Cycling ’74


With the recent release of Ableton Live 9, for the first time the Max for Live system is included with the Suite version – Max for Live is a version of the Max/MSP system designed specifically for manipulating MIDI and audio data within Ableton Live. I just found a fantastic YouTube playlist created by Cycling ’74 (creator of Max) containing 18 progressively informative tutorials on how to utilize Max for Live. Even if you’ve never considered using it before, I strongly recommend watching because there are over 100 Max devices that come standard with Live 9 Suite that you can take advantage of (or learn from!) and almost 10 times that many more available at – Links are below.

Video Series: Cycling ’74: Programming in Max for Live [YouTube]
Learning Resource: Max for Live Community []

PAX East 2013: Active Knowledge


Footage from Gigertron @ Youtube is up of my Active Knowledge set at PAX East 2013′s Jamspace (hosted by MAGFest!) – If you’re into this sort of thing, there’s a huge playlist at the link below with footage from most (if not all) of the chiptune/video game music acts throughout the weekend. What an amazing event. :-)

Link: PAX East 2013 MAGFest/BOSTON8BIT Chiptune Showcase [YouTube playlist]

Lessons Learned: Iterate and Repair

Just came across this blog post where a game developer was introduced to an optimal strategy compared to the one he originally intended for their puzzle game, Monorail. I love when a few paragraphs result in a paradigm shift in terms of problem-solving, and this is one of those times. Check it out!

Aaron Iba: Users of my iOS Game Teach Me a Lesson MIT Didn’t [Source: r/programming]

Cool Apps: ‘Send To’ Powertoy

Send To Toys - Context Menu

‘Send To’ menu is super duper enhanced by Send To Toys

Years ago, I used to have one of the MS Power Toys that were so awesome/helpful back in the day called SendToX – basically, it modified the ‘Send To’ area of your right-click menu to actually make it useful. Turns out there’s a *much* better offering over at Gabriele Ponti’s software page named Send To Toys that improves on the original Microsoft offering and is also highly configurable. When you install the utility, you can choose to head over to the control panel applet where the power in your Send To menu now becomes immediately apparent.

Send To Toys provides its own Control Panel applet to centralize configuration

Send To Toys provides its own Control Panel applet to centralize configuration

My favorite module (and the reason I found this app) is ‘Send to Command Prompt’, which allows you to choose it for any file or folder and immediately open a new command prompt in the given directory or with the path of the file you chose already entered! Such a timesaver when working with command line development tools, hey what a cool app. Oh, and it’s free! (PS: donating to independent devs that make free utilities makes the gods happy.) Super cool app.


Cool Reads: On Hardware vs. Software (Synths/Workstations)

Within the world of electronic music, if there’s any one thing to agree on it’s that there are certainly enough strong opinions to go around (and then some). Heated debate fueled by the latest VST emulation of an analog synthesizer, waxing intellectual about the pros/cons of analog/digitally modeled analog/not at all analog (these things usually hover around analog), the list goes on but it’s easy to tune out when you’re awash in a sea of synth-hipsterism. Any music culture has their signal-to-noise ratio, but it seems to be super imbalanced when it comes to the world of synths.

Enter Dan Kupka (aka Dr DK), a personal friend that has taken the time necessary to balance the needs of both those familiar with synthesizers/electronic music, with the interests of those that may only carry a casual, outsider’s view to the whole mess. I’ll be the first one to admit that before I got into synths, coming into the wealth of information on the Internet from a guitar background was pretty daunting and I almost retreated right back into the warmth of Fruity Loops… but if that sounds familiar, or maybe you’re a software guy starting to set your eyes/ears on actual hardware, the link below is a wonderful introduction to the basics of hardware versus software in the world of electronic music. A cautionary warningBy the time you get hooked, you may be far beyond the point of no return. ;-)

Dr. DK @ Quora: On Hardware vs. Software Synthesizers / Workstations

Cool read, thanks Dan!

Bugs in the Wild: NASTY YouTube ‘Delete’ button bug

Edit: So after re-reading it seems like I’m blaming this on YouTube’s new channel layout stuff, which I’m definitely not! This seems to just be an issue with the way the video manager list manages row-level delete actions. Sorry for any confusion, carry on. :-)

Well this just plain stinks. I was just managing my YouTube video list during lunch to clean it up and start using the super neat ‘One’ channel layout that they released recently – it seems to be part of a larger strategy to encompass all of their services within a framework that displays beautifully on all devices. That’s a great initiative and I will cheerlead it all day, but I am now sadface because I managed to delete a handful of my videos due to a bug in their video manager ‘list’ control. :-( I refer you to this handy diagram:

Uploads - YouTube - Google Chrome_2013-03-19_12-51-25

The bottom two videos are visual art pieces that I’ve done in the past, one for a personal track and another for a friend’s. Both close to my heart (one almost literally!), and both checked off from a previous action I took to add both videos to a playlist. After doing so, they remain checked to allow me to perform additional actions on the same video. This is fine, and it’s pretty clear that this is the case as the rows are shaded (very nice effect). However, check out what happens when I click that delete button for ‘AK – The Mind Inside You’…

Uploads - YouTube - Google Chrome_2013-03-19_13-02-34

From the looks of the confirmation dialog (and this is why I didn’t catch it right away), I’m about to delete the ONE video that is implied by the fact that the delete button is on that row. However, THE TWO CHECKED VIDEOS will instead be removed, leaving the video I intended to delete staring me in the face with a giant smirk. UGH. :-( Was really looking forward to this ‘One’ channel deal, but the only one I care about at the moment is that giant bold one that is built on lies! Lies, I say! (jk, <3 u google) Somebody please fix this, or more selfishly please let me know if it’s possible to undelete videos after the undo period has passed?

Cool Tricks: Chrome Sync in New iOS Version



Hey all, just a quick tip that it might be worth updating Chrome on your various devices if it’s been a while. The feature I’ve been waiting for (a bit impatiently) seems to be ready for prime-time as I’m now seeing an ‘Other Devices’ choice on the page that comes up for a new tab. If you are using Chrome’s sync functionality by logging into the browser with your Google account, you will see the state of your various open browser sessions and can now hop between devices on the fly!

Perhaps this had already been there for a while, but I certainly didn’t notice. If you don’t use Chrome, I strongly recommend it as in my opinion it seems a lot more responsive (at a cost of possibly being more memory-intensive). Give it a shot! :-)

Huge archive of 1930s-1960s Electronics Guides


Just hit the mother lode of old-school electronics manuals covering the spectrum of tube/cathode ray repair, hobbyist electronics stuff, tape/wire magnetic recording, etc. compiled in one place as slow-to-download PDFs. Obviously some of this stuff is going to be inaccurate or laughably out of date, but that’s actually part of the reason I’m so excited.

Note: Apparently the site is as slow as all get out, so apologies to anyone that’s eyeing any of the bigger documents… you may have to leave em going overnight! Well worth the wait if you ask me.

Tubebooks: Public Domain Electronics Books in PDF

Space Invaders TV game to MAME Controller

Update: It works. :-D  See below for Arduino sketch code and a video of SMB3 in action with FCEUltra. There is also some information at the bottom of the post from sinembarg0 on reddit about the Teensy 2, which also provides USB emulation support for a lower price!

Found this Space Invaders TV game at Radio Shack for $15, that’s going to make a fine MAME controller – it actually contains real arcade microswitches and feels like true arcade controls. AWESOME.

Confession: I was going to use Mega Man 2 as the example game, but apparently Mega Man is *super* difficult with arcade controls… or I’m just rusty these days. ;-) Here’s the code and a copy of the Arduino sketch (uggo, code view below is changing brackets on me, just download the RAR file above to get a working version of the code or replace < and > below with less than/greater than symbols):

 * Space Invaders TV Game Joystick test sketch
 * Chris Mahoney / March 17, 2013
 * Use keyboard emulation of Leonardo to press keyboard
 * keys when switches are triggered on Space Invaders controller.
//Variables for the buttons
 * Switch order:
 * (8) Ground, L, U, R, D, B, A (2)
// Arduino pin -&gt; function
int buttonLeft=7, buttonUp=6, buttonRight=5, buttonDown=4, buttonB=3, buttonA=2;
// Set all pins high before setup()
int prevLeft = HIGH, prevUp = HIGH, prevRight = HIGH, prevDown = HIGH, prevB = HIGH, prevA = HIGH;
// Array of button pins
int buttons[6] = {buttonLeft, buttonUp, buttonRight, buttonDown, buttonB, buttonA};
// Previous state of buttons
int prevButtons[6] = {HIGH, HIGH, HIGH, HIGH, HIGH, HIGH};
// Actual ASCII values to "press"
int buttonNames[6] = {KEY_LEFT_ARROW, KEY_UP_ARROW, KEY_RIGHT_ARROW, KEY_DOWN_ARROW, 122 /* Z */, 120 /* X */};
int pinCount = 6; // # of pins
void setup(void)
  // Set all pins INPUT to begin
  for (int pin = 0; pin &lt; pinCount; pin++) {
    pinMode(pin, INPUT); 
  // Enable keyboard interaction (REQUIRES LEONARDO/MICRO)
void loop(void)
  // Run each pin each loop
  for (int pin = 0; pin &lt; pinCount; pin++) {
    // Get pin value
    int buttonState = digitalRead(buttons[pin]);
    // Only process if different than last check
    if (buttonState != prevButtons[pin]) { // State change, process it
      // Pressed?
      if (buttonState == HIGH) {[pin]);   
      // Released?
      if (buttonState == LOW) {
      // Set new previous state
      prevButtons[pin] = buttonState;
    } // End state change
    // Delay to avoid freakouts if experienced
    // delay(10);

Update 2: sinembarg0 on r/Arduino gives us a lot of good info on historical USB keyboard support with the Teensy, and how that translates to emulation available through Leonardo-model Arduinos. According to their post, the Teensy 2 will allow for USB keyboard emulation and clocks in at only around $16 (I spent $35 for the Arduino Micro at Radio Shack). Thanks sinembarg0!

Cool Reads: Translated article series on development of the Famicom

Here’s a series of 6 excerpts from a series that appeared in Nikkei Magazine in 1994-95, going over the history of Nintendo’s decision to design/market the Famicom console. Always interested in this behind the scenes stuff, even much so when it’s a company going out on a limb to do something different within an industry. Super cool read.

GlitterBerri: How the Famicom Was Born

MIDI Out proof-of-concept with Arduino


Just a quick video of my MIDI out experiment finally producing results the other day by sending MIDI note data via serial from an Arduino board. This is part of a larger project I’m working on to create a Live-aware chiptune Game Boy with Arduino Micro inside for sync/other nefarious purposes. :) I’ll post a breakdown entry on here sometime this weekend.

Lessons Learned: RTFM

So I have spent a couple of weeks toying with iMini by Arturia, which as it turns out is a REALLY nice analog modeling synth for iOS based on the original Minimoog. I’ve only recently become interested in iPad music applications, because I don’t really feel the need to have a synth at the ready if I can’t record what I’m doing with it.. as it turns out I had no idea how far synth apps had come because I fail to read user manuals like it’s my job. While I was aware of (and already using) apps that function as MIDI controllers or remote Ableton surfaces, I had never even considered that maybe it’s possible to MIDI control the iOS app itself. It took two weeks before I accidentally tapped the bar at the top of the screen, where the supposed-to-be-obvious ‘CONNECT’ icon is in the top-right corner. Imagine my surprise when I was confronted with the ability to network the app with my rtpMIDI network session:


And so, lesson learned: read the flippin’ manual when you invest in music software! Then sweet, sweet things such as this will happen and they will remind you that the future is now:



Now, if only I had the patience and required time to spend with the Ableton Live user manual…