Simple colored git branch status in Bash prompt

Update August 14: just pushed version 1.1 today. Less code, better performance and small bugs fixed – I always like this combo.

Original post:

I just rewrote some code I’ve been using for embedding git branch status in the Bash command prompt. It should be faster, more robust, cleaner and more compatible now. So I put it on Github:

If you use Bash and Git, give it a spin. It is intentionally kept simple in functionality, because the prompt is not my primary source of information about git repository status. I don’t want a long and cluttered prompt in general. It also tries to be as fast as possible, because no one likes a lagging command prompt.

Bashgit screenshot
Code Linux

New version of ds

I made some incremental improvements to my trusty synchronization tool. I have added ssh master connection sharing support, which should give a nice speed up in many cases. In addition to this, there are cleanups in auto completion code and more flexible command line parsing. There is a release on Github.

I do certain things the old fashioned way – synchronizing application config and data across different hosts is one of those areas. I don’t use Dropbox or other internet services for file sync purposes, except for the builtin Google stuff on my Android phone (which is mostly app config backup). I like to keep it peer-to-peer, simple and manual. And I like to keep my data private. Ds is just the right tool to make syncing that much easier, which I guess is the reason I wrote it.

Cloud services is not something I need to manage my data. I have my own “cloud services”: A synchronization scheme which works well enough, automated backups with regular encrypted offsite storage (a future blog post), personal web and file services and high speed fibre optic internet connection – all at home. I will admit to a certain level of NIH syndrome here, but my own solutions work well enough that I will not bother looking into something else yet.


Game of Life in JavaScript

I recently had a period of time away from work to take care of my daughter at home. Of course, she would keep me busy most of the time, but being a computer enthusiast, I couldn’t resist a small side project to tinker with when otherwise idle.

My job mostly involves backend programming and architecture, so the obvious choice would be to do something entirely different. Also, the project needed to be small and manageable in size, so I could actually finish it. (My hobby computer projects tend to never truly end, but that’s another story.) There was little chance of getting any “zone time” programming done, since taking care of a small child demands much attention. So I decided to do an experiment with the HTML5 canvas element (specifically its 2D variant) and the JavaScript language. Both are rather easy to get into and easy to pick up whenever some time is available.

My canvas experiment is a “Game of Life” simulator-emulator-engine-thingy. Since the game of life is highly artificial with little resemblance to real life, it isn’t really simulating anything. Perhaps it’s emulating life at a “megascopic” scale of some sorts. At its core, it’s a game engine that draws cells, dead or alive, that evolve according to a set of simple rules. The frontend (page layout, input and controls) are separated. Code is JavaScript, of course. Should work across major modern browsers and mobile devices, though I haven’t really optimized it for touch input. It comes with a few interesting initial cell patterns and themes.

Anyway, here it is: Game of Life version 1-beta page. I doubt I’ll get much time to work with it in the coming months, but I plan to put it in my Github repo.

I’ll likely do a follow-up post later with some of my thoughts on the JavaScript language before and now, and standardization across browser implementations.