Skip to content

Instantly share code, notes, and snippets.

View spap's full-sized avatar

Szabolcs Pap spap

View GitHub Profile

ruby-1.9.3-p448 cumulative performance patch for rbenv

(I guarantee nothing. No warranty I am not responsible blah blah blah. Seems to work great for me so far. Thanks to Tyler Bird who I forked this from.)

This installs a patched ruby 1.9.3-p448 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

@spap
spap / rails_guides_to_epub.rb
Created October 3, 2011 15:31 — forked from mackato/rails_guides_to_epub.rb
Ruby on Rails Guides ePub convert ruby script
require 'rubygems'
require 'nokogiri'
require 'eeepub'
DOC_TITLE = 'Ruby on Rails Guides'
def get_pages(src_dir)
index_file = File.join(src_dir, 'index.html')
section = nil
pages = [{ :section => section, :title => DOC_TITLE, :path => index_file }]
@spap
spap / watchr.rb
Created October 2, 2011 14:47 — forked from proofek/watchr.rb
watrchr and PHPUnit integration
watch('./(.*).php') { |m| code_changed(m[0]) }
def code_changed(file)
run "phpunit"
end
def run(cmd)
result = `cd Test && #{cmd}`
growl result rescue nil
end
@spap
spap / Growl.rb
Created October 2, 2011 14:29 — forked from kurbmedia/Growl.rb
watchr + growl + rspec
class Growl
attr_accessor :report, :status
def initialize(report, opts = {})
@report, options = report, create_options(opts)
message = create_message
opts = options.inject([]) do |arr, item|
key, value = item.first, item.last