Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Harrison michael-harrison

View GitHub Profile
@michael-harrison
michael-harrison / osx_ssh_passphrase.md
Last active Feb 20, 2018
OSX Sierra SSH Passphrase persistence
View osx_ssh_passphrase.md

OSX Sierra SSH Passphrase persistence

NB: Most people use the defult SSH key ~/.ssh/id_rsa however you can create your own so change this as needed

  1. Add the following to ~/.ssh/config
Host *
  UseKeychain yes
  AddKeysToAgent yes
  IdentityFile ~/.ssh/id_rsa
@michael-harrison
michael-harrison / ssh_sessions.md
Created Jul 11, 2017
SSH Session persistence
View ssh_sessions.md

Add this ServerAliveInterval 60 to your ~/.ssh/config

@michael-harrison
michael-harrison / ssh_sessions.md
Created Jul 11, 2017
SSH Session persistence
View ssh_sessions.md

Add this ServerAliveInterval 60 to your ~/.ssh/config

View git_cheet_sheet.md

Installation

brew install git-flow

Configuration

Following are the command to setup a new repo with git-flow

mkdir new_repo_folder
git-flow init -d
@michael-harrison
michael-harrison / angular_road.md
Last active Aug 29, 2015
Rails & the Angular road: Beginnings
View angular_road.md

This article expects that you already have done the 101 AngularJS journey. If you're new to AngularJS then you'd best checkout the AngularJS Tutorial or Code Academy - AngularJS Patterns Tutorial(NB: this is for Angular 1.0.6) before continuing with this article. What we're really focusing on here are the decisions I've made and nuances discovered during the transition of a Rails app with the least resistance using the following stack:

  • Rails 4.0.x
  • Haml
  • Sass
  • Coffee
  • Devise with CanCan
  • jQuery
  • Twitter Bootstrap
  • PostgeSQL
View ereserve_developer_position.md

We are adding to our Australian based development team and are on the hunt for developers who would love the opportunity to work in a highly collaborative and productive environment.

We are looking for developers who are responsive, take pride in their work, are passionate about delivering quality code, working swiftly and efficiently and improving the user experience.

eReserve has developed reading list, workflow for study materials management processes and copyright reporting for the education sector that help improve efficiency, lower costs and reduce risk of copyright violation. We are seeking developers to help us refine our product and implement features that have arisen from our close customer collaboration. Our product is aimed at both the Australian and global education markets and is aimed at helping educators efficiently create reading lists, manage and report on copyright materials use and lower the cost of study materials management.

We are looking for developers wi

View test_file_existance.rb
# Test the existance of a file after a method call
it('will create a file') do
expect { subject.create_the_file }.to change { File.exists? my_file }.from(false).to(true)
end
@michael-harrison
michael-harrison / hash.md
Last active Aug 29, 2015
Hash to hash, dust to dust, experiment we must
View hash.md

Just had a quick look at the Ruby source and it looks like it doesn't compare the hash but uses the key object's == method to identify the right key. So to test the theory I did some experiments:

2.0.0-p247 :010 > test = {}
 => {} 
2.0.0-p247 :011 > a = [1,2]
 => [1, 2] 
2.0.0-p247 :012 > test[a]
 => nil 
2.0.0-p247 :013 > test[a] = 'cool'
 => "cool" 
@michael-harrison
michael-harrison / gist:6254595
Last active Dec 21, 2015
OSX PHP Development Setup
View gist:6254595
# PHP Installation
# ----------------
# Installed via phpbrew https://github.com/c9s/phpbrew
phpbrew install php-5.3.25 +default
phpbrew ext install openssl
phpbrew ext install mycrypt
# MySQL Installation
# ------------------
# Installed via brew http://brew.sh/
@michael-harrison
michael-harrison / with_specified_private_network.log
Last active Dec 18, 2015
Logging from Vagrant file with network specified: config.vm.network :private_network, ip: '10.202.202.10'
View with_specified_private_network.log
$ VAGRANT_LOG=DEBUG vagrant up
INFO global: Vagrant version: 1.2.3.dev
DEBUG global: Loading core plugin: /Users/neodynamic/.rvm/gems/ruby-1.9.3-p392@bb_duster/bundler/gems/vagrant-ba242cd97881/plugins/commands/box/plugin.rb
INFO manager: Registered plugin: box command
DEBUG global: Loading core plugin: /Users/neodynamic/.rvm/gems/ruby-1.9.3-p392@bb_duster/bundler/gems/vagrant-ba242cd97881/plugins/commands/destroy/plugin.rb
INFO manager: Registered plugin: destroy command
DEBUG global: Loading core plugin: /Users/neodynamic/.rvm/gems/ruby-1.9.3-p392@bb_duster/bundler/gems/vagrant-ba242cd97881/plugins/commands/halt/plugin.rb
INFO manager: Registered plugin: halt command
DEBUG global: Loading core plugin: /Users/neodynamic/.rvm/gems/ruby-1.9.3-p392@bb_duster/bundler/gems/vagrant-ba242cd97881/plugins/commands/init/plugin.rb
INFO manager: Registered plugin: init command