Skip to content

Instantly share code, notes, and snippets.

View kennon's full-sized avatar

Kennon Ballou kennon

  • Leipzig, Germany
View GitHub Profile
@kennon
kennon / rspec_rails_cheetsheet.rb
Last active August 29, 2015 14:02 — forked from them0nk/rspec_rails_cheetsheet.rb
Changed .should to expect() syntax
# Rendering
expect(response).to render_template(:index)
# Redirecting
expect(response).to redirect_to(movies_path)
# Capybara Matchers
expect(response.body).to have_content("Hello world")
expect(response.body).to have_no_content("Hello world")
@kennon
kennon / nginx.conf
Created April 11, 2012 08:04 — forked from alaz/nginx.conf
Edits and comments to the Nginx config for Riak
# Config for Nginx to act as a front-end for Riak
# The main goal is to proxy all GETs directly to Riak, and disallow anything else (POST, PUT, etc)
# Also, disallow use of the map/reduce query links (i.e. /riak/bucket/key/_,_,_)
# Config is in /etc/nginx/sites-available/default or somewhere like that
# Set up load-balancing to send requests to all nodes in the Riak cluster
# Replace these IPs/ports with the locations of your Riak nodes
upstream riak_hosts {
server 127.0.0.1:8098;