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
--- | |
:sources: | |
- http://gems.rubyforge.org | |
- http://gems.github.com | |
gem: --no-ri --no-rdoc |
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
console.log("from gist"); |
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
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 |
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
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 |
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
Hulk::Application.configure do | |
# ... | |
# other config settings for development | |
# ... | |
config.logger = Logger.new(STDOUT) | |
config.logger.level = Logger.const_get('DEBUG') | |
# ... | |
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
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 |
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
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 |
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
require 'rspec' | |
describe "Behaviour" do | |
it "should pass" do | |
true.should eq true | |
end | |
it "should fail" do | |
true.should eq false | |
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
#################################### | |
# 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 |
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
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 |