Mick Pollard

Infrastructure Coding, System Logging, Weather Statistics

Coloured git status in your bash prompt

After reading a post by Stephen Johnson I decided to reblog it here with some explanation on how to tune it to you liking. This will give you a coloured bash prompt based on the status of the current git branch you are in. (if you are in one) This is very handy to make sure things are committed or stashed before switching branches. Add the following three bash snippets to your .bashrc or .bash_profile function _git_prompt() { local git_status="`git status -unormal 2>&1`" if !

Accessing custom facter facts from the cli

At $WORK we distribute some custom facts with Puppet using puppet’s pluginsync. This will, upon first puppet run, sync the custom fact out to the client and make it available to future puppet runs. At this stage though, running facter from the cli independently from puppet is not able to find these custom facts. This is due to facter, when called from the CLI, does not read /etc/puppet/puppet.conf for the factpath setting so can not find the custom facts that pluginsync has distributed out to $vardir/lib/facter To fix this is pretty simple.

Funny Tech Support Emails

In the late 1990’s we purchased a few small ISP’s and whilst auditing their old servers (terrible mess) I come across these beauties. I thought I’d share these I found for this years System Administrator’s Appreciation Day. They both made me laugh back then and still make me laugh today. Oh how I miss the days of ISP land. $("#lightGallery").lightGallery();