View ackrc
--ignore-dir=tmp
--ignore-dir=dist
--ignore-dir=log
--ignore-dir=coverage
--ignore-file=ext:map
View gist:73810bd75ae3f9ad465b214197c51ce2
alias backop='cd /User/davidhenner/projects/backops'
alias start_mongo='mongod'
alias start_redis='redis-server'
alias start_memcached='memcached -v'
alias git_sort="git for-each-ref --sort=-committerdate refs/heads/ --format='%(color:magenta)%(committerdate:short)|%(color:green)%(refname:short)|%(color:blue)%(subject)%(color:reset)' | column -ts'|'"
alias git_sort10="git_sort | head -10"
alias git10="git_sort | head -10"
alias git20="git_sort | head -20"
alias git30="git_sort | head -30"
View gist:1e8099e2db45a3d0e251
alias backop='cd /User/davidhenner/projects/backops'
alias start_mongo='mongod'
alias start_redis='redis-server'
alias start_memcached='memcached -v'
alias git_sort="git for-each-ref --sort=-committerdate refs/heads/ --format='%(color:magenta)%(committerdate:short)|%(color:green)%(refname:short)|%(color:blue)%(subject)%(color:reset)' | column -ts'|'"
alias git_sort10="git_sort | head -10"
alias git10="git_sort | head -10"
alias git20="git_sort | head -20"
alias gitpush="git push"
View gist:8462170
# The purpose of this gist is to propose use of inheritance when upgrading objects to have "more functionality".
# For example:
# Lets say you have a `company` model and your project manager purposes a huge pivot to your existing application.
# Now new fields are "required" for the new companies you create. Unfortunately adding validators to the existing
# `company` model will cause things to blow up. You could create a form object for the new forms with form specific
# validators. Several issues are now introduced:
# 1) There can be several form objects for the company. Each with a slight difference in logic.
View gist:2655665
class Geek < Person
include StarWarsFan
end
class SeniorSoftwareDeveloper < Geek
def initialize(information, ruby_projects = [])
@likes = ["Ruby", "JavaScript", "Software Meetups", "Startups", "Code Reviews"]
@minimum_qualifications = [ "2 years of ruby, 1 year if you kicked butt",
"Writes tests for code.",
View credit_card_validator.js
var Hadean = window.Hadean || { };
Hadean.Validators = {
CreditCards : {
currentCardType : null,
creditCardInput : null,
cardRegexps : [
[ 'Visa Electron' , /^(417500|(4917|4913|4508|4844)\d{2})\d{10}$/ ]
, [ 'Visa' , /^4\d{12}(\d{3})?$/ ]
, [ 'MasterCard' , /^(5[1-5]\d{4}|677189)\d{10}$/ ]