Skip to content

Instantly share code, notes, and snippets.

View JoeWoodward's full-sized avatar

Joe Woodward JoeWoodward

View GitHub Profile
@JoeWoodward
JoeWoodward / hooks_controller.rb
Created July 4, 2013 17:14
webhooks controller for chargify
# use md5 digest to generate keys
require 'digest/md5'
class Chargify::HooksController < ApplicationController
# don't want a user to be logged in because these are callbacks from chargify
skip_before_filter :require_login
skip_before_filter :is_user_authorised
protect_from_forgery :except => :dispatch_handler
before_filter :verify, :only => :dispatch_handler
@JoeWoodward
JoeWoodward / .vimrc
Created March 10, 2014 10:24
Convert ruby to new syntax using vim. <leader>frs short for format ruby syntax
# format ruby syntax
# :symbol => 'with rocket'
# will be converted to
# symbol: 'without rocket'
function! s:FormatRuby()
silent! execute '%s/:\(\w\+\)\ =>/\1: /g'
endfunction
command! -range=% frs call <SID>FormatRuby()
select.form-control + .chosen-container.chosen-container-single .chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSn0H5xoFR9Y/7DQmImcaZNtMx+Yn2SKeBiQjTmNzryXwl/5DkXiif6U5htF2AXrjJRLuERMQbViMrZkyBRrpK0D4U0utTanieJZttjJ3J1lzpoJxV7XDxMCI/bTDDsM2JdW+A0nL83P8xiKPrR5x7us+oH9fr3HmD8tcGaRKB40AJ72ZQjM4DulhnpVIBHBA5DCbBXuLXRi4B3EarKPeSRpv/yPduldp8qJbjeXtlMDXcDt/uL5hP0+e0F+ba12+Ygm+uQ+43QeBZyo/STl24eKapKBIWm25YvGjh2y+5IOYwxT3c0Jat6lStims8p2nc51a8+T3JVnEeFvZ7qZ6h joewoodward@Joes-Air