brew tap petere/postgresqlbrew install postgresql-9.3
| # ulimit -n 1000 | |
| ab -n 1000 -c 1000 -p request.json -T "application/json; charset=utf-8" http://localhost:3004/ |
| set :stages, %w(production demo staging) | |
| set :default_stage, "staging" | |
| require "capistrano/ext/multistage" | |
| set :application, "example-app" | |
| set :repository, "[email protected]" | |
| set :branch, "master" | |
| set :scm, :git | |
| set :git_enable_submodules, 1 |
| #################################### | |
| # BASIC REQUIREMENTS | |
| # http://graphite.wikidot.com/installation | |
| # http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
| # Last tested & updated 10/13/2011 | |
| #################################### | |
| cd | |
| sudo apt-get update | |
| sudo apt-get upgrade |
| require 'rspec' | |
| describe "Behaviour" do | |
| it "should pass" do | |
| true.should eq true | |
| end | |
| it "should fail" do | |
| true.should eq false | |
| end |
| require 'rspec' | |
| config = RSpec.configuration | |
| # Example 1 | |
| # Create a documentation formatter with STDOUT steam | |
| documentation_formatter = RSpec::Core::Formatters::DocumentationFormatter.new($stdout) | |
| documentation_reporter = RSpec::Core::Reporter.new(documentation_formatter) | |
| # Example 2 |
| require 'rspec' | |
| # Add multiple formatters to formater | |
| RSpec.configure do |c| | |
| c.add_formatter(:documentation) | |
| c.add_formatter(:json) | |
| # built-in textmate formatter | |
| c.add_formatter(:textmate) | |
| end |
| Hulk::Application.configure do | |
| # ... | |
| # other config settings for development | |
| # ... | |
| config.logger = Logger.new(STDOUT) | |
| config.logger.level = Logger.const_get('DEBUG') | |
| # ... | |
| end |
| task :server do | |
| # optional port parameter | |
| port = ENV['PORT'] ? ENV['PORT'] : '3000' | |
| puts 'start unicorn development' | |
| # execute unicorn command specifically in development | |
| # port at 3000 if unspecified | |
| sh "cd #{Rails.root} && RAILS_ENV=development unicorn -p #{port}" | |
| end | |
| # an alias task | |
| task :s => :server |
| require 'cgi' | |
| require 'digest/md5' | |
| require 'net/https' | |
| require 'uri' | |
| module Jekyll | |
| class GistTag < Liquid::Tag | |
| def initialize(tag_name, text, token) | |
| super | |
| @text = text |