This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Configuration | |
SERVER='10.20.30.40' | |
DEPLOY_TO='/Users/simon/apps/some_app/staging/' | |
EXCLUDE='*.sqlite3 *.swp .DS_Store .git/ tmp/ log/ public/uploads/ uploads/' | |
DRY_RUN=false | |
DEPLOY_GEM_PATH='/Users/simon/.rvm/gems/ruby-1.9.2-p180' | |
MYSQL2_BUNDLE='/Users/simon/apps/some_app/staging/vendor/bundle/ruby/1.9.1/gems/mysql2-0.2.13/lib/mysql2/mysql2.bundle' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
571-187-661 | |
141-852-370 | |
954-700-406 | |
997-847-345 | |
745-141-212 | |
286-180-138 | |
812-747-746 | |
964-270-942 | |
262-372-429 | |
482-337-966 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mic-wet-pan | |
sin-bag-roy | |
biz-dom-mel | |
mat-yet-con | |
lap-pal-las | |
pay-bob-dem | |
faq-ted-gap | |
wan-had-bug | |
fox-gen-bad | |
say-bin-vid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on the format described in this Wikipedia article: http://en.wikipedia.org/wiki/Personal_identification_number_(Denmark) | |
"#{(20.years.ago - (0..11000).to_a.sample.days).strftime('%d%m%y')}-1#{'%03d' % (0..999).to_a.sample}" | |
# Regular expression to validate a CPR number | |
/\b(0[1-9]|[12]\d|3[01])(0[1-9]|1[0-2])\d{2}-\d{4}\b/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
box: wercker/ruby | |
services: | |
- wunki/elasticsearch@0.0.1 | |
- wercker/postgresql | |
build: | |
steps: | |
# Taken from https://gist.github.com/pjvds/6008266 | |
- script: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; CNAME | |
calendar 1 IN CNAME ghs.googlehosted.com | |
drive 1 IN CNAME ghs.googlehosted.com | |
mail 1 IN CNAME ghs.googlehosted.com | |
sites 1 IN CNAME ghs.googlehosted.com | |
video 1 IN CNAME ghs.googlehosted.com | |
; MX | |
@ 1 IN MX 10 aspmx3.googlemail.com | |
@ 1 IN MX 1 aspmx.l.google.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def possessive_name | |
# Profile name is a proper noun, so we add an apostrophe with or without 's' as appropriate | |
# e.g. Bob Smith's project or Bob Edwards' project | |
# See rule 1c. here: http://www.grammarbook.com/punctuation/apostro.asp | |
name[-1] == "s" ? "#{name}'" : "#{name}'s" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - A `Thing` can be 1% - 100% green | |
# - This is represented on the front end with a doughnut chart | |
# - The doughnut chart can't be generated since it's in an email | |
# - To get around this, we have 25 static doughnut images in increments of 4% | |
# This code takes the percentage and returns the relevant image. | |
# I'm sure there must be a more sensible way of doing this than using the | |
# world's longest switch statement. Any ideas? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colour = "##{((0..6).map{rand(256).chr}*'').unpack('H*')[0][0,6]}" | |
# => "#9ee5a3" |
NewerOlder