Skip to content

Instantly share code, notes, and snippets.

View zph's full-sized avatar

Zander Hill zph

View GitHub Profile
@zph
zph / gist:8757230
Created February 1, 2014 19:22 — forked from philipn/gist:5274197

Running Ubuntu on a Macbook Air

You don't have to be a slave to OS X! Here's a guide to a sane dual-booting setup with Ubuntu 12.10 on your shiny MacBook Air. This is written and tested for a MacBook Air 5,2 (Mid 2012), but likely works the same with any modern Macbook.

Install according to instructions at this URL:

function standup(){
open -a Safari.app 'http://www4.gotomeeting.com/join/757080295'
}
function tech_talk(){
open -a Safari.app "https://www4.gotomeeting.com/join/495279919"
}
function book_club(){
alias copy_empty_dir_tree='find . -type d | xargs mkdir -p '
replaceDoubleByteChars: (str) ->
result = for char in str.split('')
@charMap[char.charCodeAt(0)] || char
result.join('')
# Run with: rake environment elasticsearch:reindex
namespace :elasticsearch do
desc "re-index elasticsearch"
task :reindex => :environment do
klass = Place
ENV['CLASS'] = klass.name
ENV['INDEX'] = new_index = klass.tire.index.name << '_' << Time.now.strftime('%Y%m%d%H%M%S')
@zph
zph / .vimrc
Created February 19, 2014 19:58
" project specific vimrcs
" ie in root of project have a .vimrc that will be sourced in addition to the
" ~/.vimrc
set exrc
set secure
alias idg_restart='idg stop && sleep 2 && idg startup'
alias iss='idg stop && sleep 2 && idg start'
alias issmdot='idg stop && sleep 2 && idg start mdot'
alias ix='idg stop'
alias dns_flush='dscacheutil -flushcache;sudo killall -HUP mDNSResponder'
alias pivotal_number="git rev-parse --abbrev-ref HEAD | egrep -o '\d+'| head -n 1 | tr -d '\n'"
alias pivotal_copy="pivotal_number | pbcopy"
alias jj="jam upgrade && jam install"
alias remove_vcr_cassettes="rm -rf spec/vcr_cassettes/*.yml"
@zph
zph / notes.rb
Last active August 29, 2015 13:56
git clone git@github.com:zph/trello-archiver.git
cd trello-archiver
vim config.example.yml # Add credentials to file
mv config.example.yml config.yml
ruby -v
rvm use 1.9.3-p484 # Any version 1.9 or > will work. It's more annoying to get it working with the 'system ruby'
bundle install
bundle exec ruby bin/trello_backup.rb
@zph
zph / Gemfile
Created February 20, 2014 16:17
gem 'jruby-jars', JRUBY_VERSION # prevent warbler from requesting version greater than JRUBY_VERSION
gem 'warbler', '1.3.6'
gem 'activerecord-jdbcsqlite3-adapter'
gem 'jruby-openssl', require: false
@zph
zph / .vimrc
Created February 21, 2014 20:37
" resize current buffer by +/- 5
nnoremap <C-left> :vertical resize +3<cr>
nnoremap <C-down> :resize +3<cr>
nnoremap <C-up> :resize -3<cr>
nnoremap <C-right> :vertical resize -3<cr>"