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 'open-uri' | |
require 'hpricot' | |
user, project = ARGV # 'tobi', 'liquid' | |
fail "get-github-wiki <username> <projectname>" unless user and project | |
uri = "http://wiki.github.com/#{user}/#{project}" | |
xpath = "div.sidebar/ul[1]//a" | |
command = %w[wget -t 2 -mkc --no-parent] |
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
# rails application template for generating customized rails apps | |
# | |
# == requires == | |
# | |
# * rails 2.3+, rspec, cucumber, culerity (langalex-culerity gem), machinist | |
# | |
# == a newly generated app using this template comes with == | |
# | |
# * working user registration/login via authlogic, cucumber features to verify that it works | |
# * rspec/cucumber/culerity for testing |
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
#!/usr/bin/env ruby | |
def output_config | |
puts <<-END | |
graph_category App | |
graph_title passenger status | |
graph_vlabel count | |
sessions.label sessions | |
max.label max processes |
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 'rubygems' | |
require 'benchmark' | |
gem = ARGV.shift.strip rescue '' | |
if gem == '' | |
STDERR.puts "usage: #{$0} [gem]" | |
exit 1 | |
end | |
`free` |
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
# http://gist.github.com/10524 | |
# Prevents autotest from running your entire test suite after fixing a failed test. | |
# Works with ZenTest 3.10.0 | |
# Place this in your .autotest file: | |
require 'rubygems' | |
require 'active_support' | |
class Autotest | |
def run_with_not_rerunning_everything | |
hook :initialize |
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
# autocompletion for ruby_test | |
# # works with tu/tf aliases | |
# # see also ~/bin/ruby_test.rb | |
_ruby_tests() { | |
if [[ -n $words[2] ]]; then | |
compadd `ruby_test -l ${words[2]}` | |
fi | |
} | |
compdef _ruby_tests ruby_test | |
alias tu="ruby_test unit" |
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
# Rake tasks for managing git plugins with submodules. | |
# | |
# These tasks aim to make life simpler by automating all the boring work. | |
# What you get: | |
# - complete git integration (all you need to know is install, uninstall and update) | |
# - complete github integration (only use author name + plugin name) | |
# - rails plugin hooks (install.rb/uninstall.rb) are taken care of | |
# | |
# Available commands: | |
# |
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
CmdUtils.CreateCommand( | |
{ | |
name: "rails", | |
takes: {"method": noun_arb_text}, | |
icon: "http://rubyonrails.org/images/rails.png", | |
homepage: "", | |
author: {name: "Zhao Lu", email: "[email protected]"}, | |
license: "MPL,GPL", | |
description: "Search rails documentation", | |
help: "Type a rails class or method", |
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
CmdUtils.CreateCommand({ | |
author: { name: "elbarto", email: "[email protected]"}, | |
description: "search w3schools with google", | |
name: "w3", | |
takes: {"w3": noun_arb_text}, | |
preview: function( pblock, searchTerm) { | |
pblock.innerHTML = "Searches w3schools for: " + searchTerm.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
if (CmdUtils.parserVersion == 2) { | |
CmdUtils.CreateCommand({ | |
names: ["trends", "google trends", "google search trends"], | |
icon: "http://www.google.com/favicon.ico", | |
author: {name: "Pratham Kumar", email: "[email protected]"}, | |
description: "Google Trends.", | |
homepage: "http://pratham.name/", | |
arguments: [{role: 'object', nountype: noun_arb_text, label: 'query'}], | |
preview: function (html, args) { |
OlderNewer