Skip to content

Instantly share code, notes, and snippets.

View JoeWoodward's full-sized avatar

Joe Woodward JoeWoodward

View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSn0H5xoFR9Y/7DQmImcaZNtMx+Yn2SKeBiQjTmNzryXwl/5DkXiif6U5htF2AXrjJRLuERMQbViMrZkyBRrpK0D4U0utTanieJZttjJ3J1lzpoJxV7XDxMCI/bTDDsM2JdW+A0nL83P8xiKPrR5x7us+oH9fr3HmD8tcGaRKB40AJ72ZQjM4DulhnpVIBHBA5DCbBXuLXRi4B3EarKPeSRpv/yPduldp8qJbjeXtlMDXcDt/uL5hP0+e0F+ba12+Ygm+uQ+43QeBZyo/STl24eKapKBIWm25YvGjh2y+5IOYwxT3c0Jat6lStims8p2nc51a8+T3JVnEeFvZ7qZ6h joewoodward@Joes-Air
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;
@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()
@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
body {
background-color: grey;
header {
width: 960px;
.logo {
border: 1px solid white;
}
}
@JoeWoodward
JoeWoodward / screen.scss
Created June 23, 2013 12:36
@import files into screen.scss
// Mixins and variables
@import "partials/base";
// Partials
@import "partials/reset";
@import "partials/typography";
@import "partials/buttons";
@import "partials/grid";
@import "partials/layout/header";
@import "partials/layout/article";
@JoeWoodward
JoeWoodward / jQuery.slickSlider.js
Created September 26, 2012 08:09
jQuery.slickSlider.js files including markup and styles
$.fn.initSlickSlider = function(options){
var goToMargin;
// #TODO modulate slide function for fade only!
// set default options
var settings = jQuery.extend({
transitionDuration: 300, fade: true
}, options);
@JoeWoodward
JoeWoodward / aliased-git-completion
Created March 22, 2012 11:38
Git auto-complete script for wrapping aliases. Insert into .bash_profile below anything git related
# wrap_alias takes three arguments:
# $1: The name of the alias
# $2: The command used in the alias
# $3: The arguments in the alias all in one string
# Generate a wrapper completion function (completer) for an alias
# based on the command and the given arguments, if there is a
# completer for the command, and set the wrapper as the completer for
# the alias.
function wrap_alias() {
[[ "$#" == 3 ]] || return 1
Processing by Chargify::HooksController#dispatch_handler as XML
Parameters: {"payload"=>{"chargify"=>"testing"}, "event"=>"test"}
Completed 500 Internal Server Error in 2ms
NameError (uninitialized constant Chargify::HooksController::MD5):
app/controllers/chargify/hooks_controller.rb:74:in `verify'
HarleyHealthVip::Application.routes.draw do
get 'faqs' => 'faqs#index', :as => 'faqs'
resources :notices, :only => [:index, :show]
# events routes
get 'events' => 'events#index', :as => 'events'
get 'events/:id' => 'events#show', :as => 'event'