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
variable "input" { | |
default = "a b c" | |
} | |
resource "template_file" "json" { | |
template = "{ \"somekey\": [${list}] }" | |
vars { | |
list = "${join(", ", formatlist("\\"%s\\"", split(" ", var.input)))}" | |
} | |
} |
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
BREW_CASK_PREFIX = `brew --prefix brew-cask`.chomp | |
$LOAD_PATH << File.join(BREW_CASK_PREFIX, 'rubylib') | |
require 'cask' | |
module CaskCategories | |
CATEGORIES = { | |
'adium' => 'chat', | |
'rdio' => 'music', | |
'firefox' => 'browser', |
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
# config/deploy.rb | |
$: << File.expand_path('../../lib', __FILE__) | |
require 'capistrano_hacks/reverse_tunnel' | |
set :scm, :git | |
set :local_repository, '.' | |
set :reverse_tunnel_port, 52222 | |
set :repository, Capistrano::Hacks.tunneled_repository_url(self) | |
set :ssh_options, { :forward_agent => true } |
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 ruby | |
require 'rubygems' | |
require 'highline' | |
def ask(question) | |
HighLine.new.ask(question) { |q| q.echo = '*' } | |
end | |
if ENV['AWS_SHELL'] |
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
config.after_initialize do | |
# Set Time.now to September 1, 2008 10:05:00 AM (at this instant), but allow it to move forward | |
t = Time.local(2008, 9, 1, 10, 5, 0) | |
Timecop.travel(t) | |
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
#!/bin/sh | |
## set up postgres (in this case 9.0 from macports | |
export PGCTL=/usr/local/bin/pg_ctl | |
export PGDATA=/Volumes/pgtmp/postgres | |
case $1 in | |
start) | |
## Make a RAM filesystem | |
diskutil erasevolume HFS+ "pgtmp" `hdiutil attach -nomount ram://1048576` |
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
class FooDog | |
def bark(loud=false) | |
if loud | |
puts "BARK" | |
else | |
puts "bark" | |
end | |
end | |
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
provider "aws" { | |
access_key = "foo" | |
secret_key = "bar" | |
region = "us-east-1" | |
} | |
module "vpc" { | |
source = "./tf_aws_vpc" | |
name = "keyprovidertest" |
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
# See https://groups.google.com/d/msgid/terraform-tool/db2ee775-e8b8-4e6b-8b3a-35fb182a1571%40googlegroups.com | |
# Setting region so AMI always works, configure the rest via env vars | |
provider "aws" { | |
region = "us-west-2" | |
} | |
resource "aws_vpc" "from" { | |
cidr_block = "10.1.0.0/16" | |
} |
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
. | |
├── Entitlements.plist | |
├── PLCrashReporter.h | |
├── Sparrow-main.a | |
├── app | |
│ └── Sparrow.app | |
│ ├── 1sur3.png | |
│ ├── 1sur3@2x.png | |
│ ├── 1sur4.png | |
│ ├── 1sur4@2x.png |