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
module M | |
module ClassMethods | |
def foo | |
self.bar | |
end | |
private | |
def bar | |
'bar' | |
end | |
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
module Flip; $KCODE = "u" | |
FLIP_MAP = Hash.new{|h,k| k} | |
{ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiklmnopqrstuvwxyz' => | |
'∀ᗺↃᗡƎℲ⅁HIᒋʞ⅂ƜNOdԾᖈS⊥ႶΛMX⅄Zɐqɔpǝɟɓɥᴉʞ│ɯuodbɹsʇnʌʍxʎz', | |
'123456890~!@$%^&*()_+{}:|<>?"#`[],./-=\\' => | |
'|ᘔᗴhᔕ9860~¡Ꭷ$%⋁⅋*)(‾+}{:|><¿„#ˎ][‘˙/-=\\' | |
}.each {|from,to| from.split(//).zip(to.split(//)).each {|f,t| FLIP_MAP[f]=t }} | |
FLIP_MAP.merge!("'"=>',', '7'=>'/̲', 'j'=>'⌠̣', ';'=>':́') | |
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
# | |
# .autotest | |
# Autotest Growl Notifications for Rspec and Test::Unit | |
# | |
# Created by Rein Henrichs on 2007-09-12. | |
# Copyright 2007 Rein Henrichs. | |
# http://pastie.caboo.se/96573/download | |
# | |
require "autotest/redgreen" | |
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
Instructions for setting up username.github.com * | |
Create a repo named username.github.com | |
Push a `master` branch to GitHub and enjoy! | |
Instructions for setting up username.github.com/repo-name * | |
Caution: make your working directory clean before you do this (either stash or commit), otherwise this will lose any changes you've made to your project since the last commit. | |
cd /path/to/repo-name |
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
source ~/.git-completion.sh | |
alias gco='git co' | |
alias gci='git ci' | |
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
# CURSOR MOVEMENT | |
ctrl-a # go to beginning of the line | |
ctrl-e # go to end of the line | |
ctrl-x # (2 times) to remember current cursor location and move to the previous cursor location | |
# cycle this command to move between current and previous cursor location | |
ctrl-c # leave current line intact, and move cursor to a new line (return but don't execute command) | |
ctrl-j/ctrl-m # (less useful) return and execute command | |
esc-b # move cursor one WORD to the left |
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 | |
# A simple Ruby script to update Chromium from dev build. | |
# Currently only works on Mac. You should be able extend it to Linux and Windows without much fuzz. | |
# If you want progress bar, sudo gem install ruby-progressbar | |
# Usage: | |
# ruby chromium_updater.rb | |
require 'fileutils' | |
require 'open-uri' |
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
## ENV | |
environment do | |
<<-ENV_CODE | |
config.active_record.timestamped_migrations = false | |
config.active_record.schema_format = :sql | |
# ENV['RAILS_ASSET_ID'] = '' # turn off assets timestamp | |
ENV_CODE | |
end |
OlderNewer