Skip to content

Instantly share code, notes, and snippets.

View fnichol's full-sized avatar

Fletcher Nichol fnichol

View GitHub Profile
Feature: Website navigation
In order to navigate the website by links
As a site visitor
I want to have a top level navigation
Scenario: About us nav link
Given I am on the home page
When I follow "About Us"
Then I should be on the aboutus page
#!/usr/bin/env bash
# ## Installing iTerm2 on Mac OS X 10.5/10.6
#
# bash < <(curl -L http://gist.github.com/raw/824149/iterm2_install.sh)
#
url="http://iterm2.googlecode.com/files/iTerm2-alpha16.zip"
zip="${url##http*/}"

Turnkey Vagrant Staging Environment

Installation

Install the vagrant and chef gems:

gem install vagrant chef

Create a vagrant project directory to work out of:

Note the nginx =&gt; {:proxy =&gt; "enable"} is to expose Jenkins on port 80 while keeping the backend process privilege separated and on port 8080.

@fnichol
fnichol / Guardfile
Created March 17, 2011 02:20
One of my current Guardfiles
# More info at https://github.com/guard/guard#readme
guard 'ego' do
watch('Guardfile')
end
guard 'spork' do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.*\.rb$})
@fnichol
fnichol / database.yml
Created March 24, 2011 02:12
An example using ActiveRecord to connect to a WordPress database
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: rails_proj_development
pool: 5
username: rp_dev
password: wootwoot
host: localhost
@fnichol
fnichol / default-site.conf
Created April 18, 2011 06:12
nginx init.d script hacked for iterative_chef lab
server {
listen 80;
server_name "";
location / {
root html;
index index.html index.htm;
}
# redirect server error pages to the static page /50x.html
cache_dir="/var/cache/downloads"
tar_url="http://nginx.org/download/nginx-0.9.7.tar.gz"
tar_file="${tar_url##http*/}"
tar_dir="${tar_file%.tar.gz}"
configure_flags="
--prefix=/opt/${tar_dir}
--conf-path=/etc/nginx/nginx.conf
--with-http_ssl_module
"
pkgs=( wget build-essential binutils-doc autoconf flex bison
@fnichol
fnichol / dna.json
Created April 28, 2011 18:34
Example webapp server configured with chef-solo dna.json
{
"webapp": {
"web_server": "apache2",
"vhosts": [
{ "id": "production",
"host_name": "main.example.com",
"non_ssl_server": true,
"www_redirect": false,
"ssl_server": true,
"ssl_www_redirect": false
@fnichol
fnichol / Vagrantfile
Created May 2, 2011 19:04
Example chef/rvm in vagrant
Vagrant::Config.run do |config|
config.vm.box = "lucid32"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "chef-repo/cookbooks"
chef.roles_path = "chef-repo/roles"
if ENV['vdb'] == "1"
chef.log_level = :debug