Skip to content

Instantly share code, notes, and snippets.

View michael-harrison's full-sized avatar

Michael Harrison michael-harrison

View GitHub Profile
@michael-harrison
michael-harrison / test_multi_select.rb
Created November 18, 2012 00:37
jQuery Chosen Testing with Capybara
=begin
Notes
=====
Labels: On the label you should put a "for" attribute if you're not using something like simple_form
This helps capybara to find your field
e.g. <label for="my_field_id">Some label</label>
=end
field = "Label on my field"
value = "existing option in list"
@michael-harrison
michael-harrison / osx_ssh_passphrase.md
Last active February 20, 2018 04:56
OSX Sierra SSH Passphrase persistence

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 July 11, 2017 23:01
SSH Session persistence

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

@michael-harrison
michael-harrison / ssh_sessions.md
Created July 11, 2017 23:01
SSH Session persistence

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

@michael-harrison
michael-harrison / gist:6254595
Last active December 21, 2015 05:09
OSX PHP Development Setup
# 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 December 18, 2015 07:19
Logging from Vagrant file with network specified: config.vm.network :private_network, ip: '10.202.202.10'
$ 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
@michael-harrison
michael-harrison / gist:5140611
Last active December 14, 2015 19:59
Creating a CentOS 6.3 with Puppet VM with Vagrant and VirtualBox
# Download and install VirtualBox (see https://www.virtualbox.org/wiki/Downloads) in your flavour of OS
# Download and install Vagrant (see http://downloads.vagrantup.com/) in your flavour of OS
# Get the box from Puppet Labs
# For other boxes check out http://puppet-vagrant-boxes.puppetlabs.com/ and http://www.vagrantbox.es/
vagrant box add centos63 http://puppet-vagrant-boxes.puppetlabs.com/centos-63-x64.box
# Init you new VM
mkdir my_vm
cd my_vm
@michael-harrison
michael-harrison / git_cheet_sheet.md
Last active August 29, 2015 14:07
Git Flow Cheat Sheet

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 August 29, 2015 14:05
Rails & the Angular road: Beginnings

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
@michael-harrison
michael-harrison / ereserve_developer_position.md
Created April 23, 2014 22:57
Developer Position at eReserve

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