Diff.rb
A simple diff utility written in Ruby. It works with single or multi-line strings and returns an array of hashes that indicates the line number affected and change: added, deleted, or same.
Example:
| Spork.prefork do | |
| require "rails/application" | |
| # Prevent Devise from loading the User model super early with it's route hacks for Rails 3.1 rc4 | |
| # see also: https://github.com/timcharper/spork/wiki/Spork.trap_method-Jujutsu | |
| Spork.trap_method(Rails::Application, :reload_routes!) | |
| Spork.trap_method(Rails::Application::RoutesReloader, :reload!) | |
| # rest of your prefork here... | |
| end |
| source 'http://rubygems.org' | |
| gem 'rails', '3.1.0.rc4' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'pg' | |
| # Asset template engines | |
| gem 'sass-rails', "~> 3.1.0.rc" |
Diff.rb
A simple diff utility written in Ruby. It works with single or multi-line strings and returns an array of hashes that indicates the line number affected and change: added, deleted, or same.
Example:
| gem 'ruby-prof' |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| var XML_CHAR_MAP = { | |
| '<': '<', | |
| '>': '>', | |
| '&': '&', | |
| '"': '"', | |
| "'": ''' | |
| }; | |
| function escapeXml (s) { | |
| return s.replace(/[<>&"']/g, function (ch) { |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| <!doctype html> | |
| <head> | |
| <title>Stripe OAuth Example</title> | |
| </head> | |
| <body> | |
| <%= @access_token %> | |
| </body> | |
| </html> |
| /** | |
| * Module dependencies. | |
| */ | |
| var express = require('express') | |
| , routes = require('./routes') | |
| , http = require('http'); | |
| var app = express(); | |
| var server = app.listen(3000); |
| require 'spec_helper' | |
| describe "Faking it with Savon" do | |
| before do | |
| Savon.hooks.define "Fake Response", :soap_request do | |
| HTTPI::Response.new(200, {}, "<Envelope><Body><response>Success!</response></Body></Envelope>") | |
| end | |
| after do | |
| Savon.hooks.reject! "Fake Response" |