Cruisemaniac Dad, Husband, Geek!

Git vulnerability announced! Upgrade your git client

Git just announced a new release (ver 2.2.1) of the git client that fixes a vulnerability affecting all git users on Windows and Mac OSX operating systems. Github says this:

The vulnerability concerns Git and Git-compatible clients that access Git repositories in a case-insensitive or case-normalizing filesystem. An attacker can craft a malicious Git tree that will cause Git to overwrite its own .git/config file when cloning or checking out a repository, leading to arbitrary command execution in the client machine. Git clients running on OS X (HFS+) or any version of Microsoft Windows (NTFS, FAT) are exploitable through this vulnerability. Linux clients are not affected if they run in a case-sensitive filesystem.

We strongly encourage all users of GitHub and GitHub Enterprise to update their Git clients as soon as possible, and to be particularly careful when cloning or accessing Git repositories hosted on unsafe or untrusted hosts.

If you’re using homebrew, the process is very very simple:

brew doctor

brew update

brew upgrade git

You can download the latest clients for windows and OSX from the links provided. They have been patched for the vulnerability already.

Git for Ages 4 and Up

Its a long video at a little over 1.5 hours but there is no better resource on the internet that can explain Git like how this video does!

Totally worth it.

Get Vagrant running with berkshelf on Mavericks

So, here I was trying to setup Vagrant on my Mac. Everything went fine till the vagrant up command and boom:

myfirstvagrantproject $ vagrant up
Bringing machine 'projectname' up with 'virtualbox' provider...
==> projectname: The cookbook path '/Users/cruisemaniac/.berkshelf/projectname/vagrant/berkshelf-20140909-37664-1gf5t34-projectname' doesn't exist. Ignoring...
Updating Vagrant's berkshelf: '/Users/cruisemaniac/.berkshelf/projectname/vagrant/berkshelf-20140909-37664-1gf5t34-projectname'
RuntimeError: Couldn't determine Berks version: #<Buff::ShellOut::Response:0x00000101040360 @exitstatus=1, @stdout="", @stderr="/Users/cruisemaniac/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'berkshelf' (>= 0) among 56 total gem(s) (Gem::LoadError)\n\tfrom /Users/cruisemaniac/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/dependency.rb:309:in `to_spec'\n\tfrom /Users/cruisemaniac/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in `gem'\n\tfrom /Users/cruisemaniac/.rbenv/versions/2.1.2/bin/berks:22:in `<main>'\n">

I knew vagrant liked chef_solo and berkshelf to assist in the scripts that handle provisioning the VM. So I went ahead and installed the gems before starting out with the vagrant install.

What I could not understand was how berkshelf which was installed under my rbenv (via homebrew) was not found while the gem was being picked up right! « I know, shitty!

My local setup gave me this:

myfirstvagrantproject $ vagrant version
Installed Version: 1.6.5
Latest Version: 1.6.5
You're running an up-to-date version of Vagrant!

myfirstvagrantproject $ berks --version
myfirstvagrantproject $ which berks

All is well right? Well, No!

Apparently, the berkshelf gem used by vagrant requries chefdk, the chef development kit and wont work hanky panky without that.

Remove any berkshelf AND chef gems from your ruby installationbefore you start off with the chefdk installation.

Install chefdk into your /opt folder - again a requirement. Add this to the .bash_profile before your gems are loaded.

export PATH=/opt/chefdk/bin

Reload your .bash_profile and you must be good to go.

The other option is that you dont use berkshelf with chef OR you use puppet.

If you dont want to use berkshelf, open the Vagrantfile and set the following to false:

Vagrant.configure("2") do |config|
  config.berkshelf.enabled = false
  # other configuration code

You would also have to remove the Berkshelf file sitting in your vagrant directory to prevent Vagrant from complaining about an existing Berkshelf file that its not using!

Hope this helps.

Homebrew and MySQL

I was recently trying to setup MySQL with Homebrew and noticed that the mysql server that brew installed was not playing nice with the existing setups.

The solution is to wipe out any existing MySQL installs you’ve got on your mac and redo everything from scratch with brew. This makes the mysql installed from Brew your main installation.

Read up on this blogpost that details the sequence. 5 minutes, a few commands and all is hanky-panky in mysql land :-)

Credits to Cory Simmons for the original blog post!

People Forget

The most important offering at a restaurant is not the food. Its the experience while at the restaurant that makes a person go visiting again. Or swoon about it on social media! Good food is just, “so to speak”, the icing on the cake!

Thats why I pay you a premium for the experience!

When you forget something as essential as a customer’s order, the tastiest of dishes at your establishment takes a back seat over a spoilt evening for the people at the table!

Apologize genuinely, Make quick amends and move on.

In the days of social media and instant feedback, its as easy to keep a good face as it is to tumble and fall.

Buon Appétit!