Skip to content

Instantly share code, notes, and snippets.

import logging
import zerigodns
import boto
from boto.route53.record import ResourceRecordSets
from boto.s3.website import RedirectLocation
# There is no API for these so we have to embed and lookup
# https://forums.aws.amazon.com/thread.jspa?threadID=116724
# http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
@danbt79
danbt79 / deploy.rb
Created March 11, 2013 18:41 — forked from mhayes/deploy.rb
require 'capistrano/ext/multistage'
require "bundler/capistrano"
#use local key for authentication
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
set :application, 'awesome'
set :repository, "git@github.com:zurb/awesome.git"
# ===================================
# Capistrano Multistage Configuration
# ===================================
# 1) Let your 'config/deploy.rb' know that you're using multistage
# ===================================
# config/deploy.rb
# ===================================
set :stages, %w(staging production)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
@danbt79
danbt79 / brew-install-gs-02.make
Created October 3, 2012 01:28
'brew install gs' fails on 'make install'
$ brew doctor
Your system is raring to brew.
$ cat ~/Library/Logs/Homebrew/ghostscript/02.make
cc -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long int" -DUSE_LIBICONV_GNU -I/usr/local/Cellar/libtiff/4.0.2/include -lz -I./base -o ./obj/aux/genconf ./base/genconf.c
brew: superenv removed: -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement
cc -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long int" -DUS
# Musings on <select> inputs:
# (aka: how Rails is doing it right.)
# This is what Rails looks like in the books:
f.date_select :end_date
# This is what Rails looks like in production:
f.date_select :end_date, {:include_blank => false, :start_year => Time.zone.now.year, :end_year => (Time.zone.now + 2.years).year, :order => [:month, :day, :year], :prompt => {:month => t(:select_month), :day => t(:select_day), :year => t(:select_year)} }, {:class => 'datetime_picker'}
# The second may be long, but it's still just a single line.