Skip to content

Instantly share code, notes, and snippets.

View wm's full-sized avatar

Will Mernagh wm

View GitHub Profile
@wm
wm / hangout
Last active December 12, 2015 02:48 — forked from drinks/hangout
#!/usr/bin/env ruby
### make sure you `brew install chromedriver` and `gem install selenium-webdriver` before running this!
require 'rubygems'
require 'selenium-webdriver'
hangout_url = ENV['hangout_url']
hangout_email = ENV['hangout_email']
hangout_password = ENV['hangout_password']
@wm
wm / Powerline.md
Last active September 6, 2022 00:55
Installing powerline on Mac OSX. The following was done in version Version 10.8.2

Install dependencies

brew install cmake
brew install python
sudo easy_install pip

Add powerline bin to your path. In your zshrc file (or the paths files sourced in zshrc) add the following line

PATH="/usr/local/share/python/:$PATH"

Reinstall MacVim with brew

describe 'simple object' do
class A
def initialize
@c = 'ccc'
@d = 'ddd'
end
def default
'aaa'
@wm
wm / boston.rb
Last active December 15, 2015 04:28 — forked from bcardarella/gist:5201416
class Boston < Town
LAT = "30°4′E"
LNG = "29°41′S"
REFERENCE = "http://en.wikipedia.org/wiki/Boston,_KwaZulu-Natal"
end

A Trello Board

[![Trello Development Board](https://trello.com/b/nC8QJJoZ.png)](https://trello.com/b/nC8QJJoZ)

Trello Development Board

A Trello Card

@wm
wm / decorator.rb
Created August 27, 2013 21:29
Decorate an Enumerable collection
class FancyDecorator < SimpleDelegator
def full_name
"#{first_name} #{last_name}"
end
def last_name_first
"#{last_name}, #{first_name}"
end
def self.decorate_collection(collection)
@wm
wm / devise.rb
Created August 28, 2013 23:50
Overriding the omniauth scope and translating it into a devise scope!
# Devise Client using omniauth
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
config.omniauth :icis, APP_ID, APP_SECRET, client_options: { :site => APP_URL }, scope: 'person,read_only'
# ~/.tmuxinator/icis.yml
name: icis
root: ~/src/
windows:
- icisstaff:
layout: main-horizontal
panes:
- cd ~/src/icisstaff; foreman start
- cd ~/src/icisstaff; tail -f ~/src/icisstaff/log/development.log
- snowflake:
let g:zeus_prefix = ""
let g:bundle_prefix = ""
let g:fdoc_prefix = ""
" Toggle the rspec_command
function! ToggleRspecCommand(prefix_name, prefix)
if g:{a:prefix_name}_prefix != ""
let g:{a:prefix_name}_prefix = ""
else
let g:{a:prefix_name}_prefix = a:prefix . " "
@wm
wm / MavericksUpgrade.md
Last active December 26, 2015 07:49
Upgrade OSX to Mavericks (Xcode, brew, boxen etc.)

Upgrades

  1. Install Mavericks
  2. Upgrade Xcode via App Store
  3. Launch Xcode to accept terms and auto install components
  4. Run the following commands
  • $ xcode-select --install # install command line tools if you have not already
  • $ boxen
  • $ brew update