This file contains hidden or 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
# Usage: | |
# | |
# If your controller action looks like this | |
# | |
# def show | |
# @person = Person.find(params[:id]) | |
# SlowPersonater(@person) | |
# end | |
# | |
# change it to look like this: |
This file contains hidden or 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 | |
# usage: ruby licenses.rb /path/to/directory | |
# credit to https://github.com/dblock/gem-licenses for the skeleton of this code | |
require 'iconv' | |
class String | |
# basically copying this from the core app | |
def to_utf8_safe |
This file contains hidden or 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
# File: /etc/nginx/sites-enabled/rails_pet_clinic | |
# easiest if you put it in /etc/nginx and symlink to sites-enabled/rails_pet_clinic | |
# Mostly yanked from: | |
# http://bit.ly/nginx-unicorn-setup | |
# and http://tomkersten.com/articles/nginx-unicorn-rvm-server-setup/ | |
upstream rails-pet-clinic { | |
# fail_timeout=0 means we always retry an upstream even if it failed | |
# to return a good HTTP response (in case the Unicorn master nukes a |
This file contains hidden or 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
bundle update rack activeresource acts_as_state_machine rails formtastic | |
This file contains hidden or 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
require 'builder' | |
class Sitemap | |
STATIC_URLS = ['/home/about', | |
'/home/help', | |
'/home/contact_us', | |
'/home/terms'] | |
class << self |