This file contains hidden or 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 | |
# Script to benchmark ActiveRecord + MySQL vs Tokyo Cabinet tables | |
require 'rubygems' | |
require 'benchmark' | |
require 'faker' | |
require 'date' | |
require 'fileutils' | |
require 'activerecord' |
This file contains hidden or 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
Sat May 02 13:20:05 +0200 2009 | |
N is 1000 | |
ruby is 1.8.7 | |
Preparing data... | |
== PeopleMigration: reverting ================================================ | |
-- drop_table(:people) | |
-> 0.0447s | |
== PeopleMigration: reverted (0.0450s) ======================================= |
This file contains hidden or 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 | |
# Input: WordPress XML export file. | |
# Outputs: a series of Textile files ready to be included in a Jekyll site, | |
# and comments.yml which contains all approved comments with metadata which | |
# can be used for a Disqus import. | |
require 'rubygems' | |
require 'hpricot' | |
require 'clothred' |
This file contains hidden or 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 | |
# Parse Tumblr JSON. | |
require 'rubygems' | |
require 'json' | |
require 'net/http' | |
class String |
This file contains hidden or 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 | |
require 'dbus' | |
bus = DBus::SessionBus.instance | |
banshee_service = bus.service("org.bansheeproject.Banshee") | |
banshee = banshee_service.object("/org/bansheeproject/Banshee/PlayerEngine") | |
puts banshee.introspect |
This file contains hidden or 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
# Clone a repo (like git clone): | |
git-svn clone svn+ssh://[email protected]/svn/paperbox | |
# You should be on master branch (check with git branch) | |
# After compiling, append svn:ignore settings to | |
# the default git exclude file: | |
git-svn show-ignore >> .git/info/exclude | |
# Do some work and commit locally to git: | |
git commit ... |
This file contains hidden or 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
#!/bin/sh | |
# | |
# A hook script for the git post-receive event of a Jekyll web site's repository. | |
# It needs to unset the GIT_DIR environment variable which is otherwise fixed | |
# to siterepo/.git. Remember to chmod +x post-receive. | |
echo "Running post-receive hook..." | |
cd /var/siteroot && env -i git pull && jekyll |
This file contains hidden or 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
#!/bin/bash | |
# Infinite rainbow in terminal | |
yes "$(seq 1 255)" | while read i; do printf "\x1b[48;5;${i}m\n"; sleep .01; done |
This file contains hidden or 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 | |
# Creates a blank textile file with basic YAML front matter for | |
# your Jekyll blog. Then it launches gvim so that you can start | |
# writing immediately. | |
# | |
# Assumes your posts are in ./blog/_posts and that you're using a layout | |
# called 'post'. | |
if ARGV.empty? |
This file contains hidden or 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
Missing rack.input (RuntimeError) | |
./vendor/plugins/facebooker/lib/facebooker/rails/facebook_url_rewriting.rb:47:in `rewrite_url' | |
(eval):17:in `reserve_patron_restaurant_path' | |
./features/support/paths.rb:15:in `path_to' | |
./features/step_definitions/web_steps.rb:24:in `/^(?:|I )go to (.+)$/' | |
features/lander.feature:8:in `And I go to lander reserve path' |
OlderNewer