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/bash | |
# Install rbenv | |
# https://github.com/sstephenson/rbenv | |
cd ~ | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bash_profile | |
echo 'eval "$(rbenv init -)"' >> .bash_profile |
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
input { | |
file { | |
type => "rails" | |
path => ["/docker/log/logstash_production.log"] | |
codec => json { | |
charset => "UTF-8" | |
} | |
} | |
rabbitmq { |
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
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
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 Array | |
def just_like_map | |
r = [] | |
self.each do |a| | |
r << yield(a) | |
end | |
r | |
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
#!/bin/sh | |
grep '\-\-dns' /var/lib/boot2docker/profile || { | |
echo 'EXTRA_ARGS="$EXTRA_ARGS --dns 192.168.99.100 --dns 8.8.8.8 --dns 8.8.4.4"' | sudo tee -a /var/lib/boot2docker/profile | |
} | |
echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4" | sudo tee /etc/resolv.conf |
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
name=${PWD##*/} | |
if docker-machine ls | grep -q "^$name\s" ; then | |
echo 'machine found' | |
else | |
echo 'machine not found. creating...' | |
docker-machine create --driver virtualbox $name | |
docker-machine ssh $name "sudo curl -o /var/lib/boot2docker/bootsync.sh https://gist.githubusercontent.com/thogg4/81de781d4a21382d1c11/raw/9b342537b42e1b7c595a9e1e112c2a131322fb51/bootsync.sh" | |
docker-machine restart $name | |
fi |
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
call pathogen#runtime_append_all_bundles() | |
set noswapfile | |
filetype plugin indent on | |
" Make Vim remember cursor position | |
if has("autocmd") | |
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | |
\| exe "normal! g'\"" | endif | |
endif |
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 | |
git_bundles = [ | |
"git://github.com/msanders/snipmate.vim.git", | |
"git://github.com/thogg4/only-primary-nerdtree.git", | |
"git://github.com/timcharper/textile.vim.git", | |
"git://github.com/tpope/vim-cucumber.git", | |
"git://github.com/tpope/vim-fugitive.git", | |
"git://github.com/tpope/vim-git.git", |
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
create role myapp with createdb login password 'myapp'; // 'login' is optional if you plan to use psql | |
// with newer versions of Rails, 'rake db:create:all' will create all the databases listed in config/database.yml | |
select * from pg_user; // verify user created | |
select * from pg_shadow; // sysid listed here | |
create database myapp_development owner myapp; | |
create database myapp_test owner myapp; |
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
module Rack | |
class ExceptCatcher | |
def initialize(app, mailer) | |
@app = app | |
@mailer = mailer | |
@ignore = [404] | |
@hash_blacklist = %w(rack.session.options) | |
end | |
def call(env) |
OlderNewer