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
| function filter_git_repo () | |
| { | |
| cd ../GitRepos/$1; | |
| git filter-branch --subdirectory-filter $1 -- --all; | |
| cd ../../cockpit-svn/ | |
| } | |
| function push_git_repo () | |
| { | |
| git push $1 --all |
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
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby | |
| # - a browser with WebSocket support | |
| # | |
| # Usage: | |
| # ruby redis_pubsub_demo.rb | |
| # |
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
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'digest/md5' | |
| require 'fastercsv' | |
| require 'json' | |
| require 'curb' | |
| require 'pp' | |
| data = [] |
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
| sudo mkdir /usr/local | |
| sudo chown -R `whoami` /usr/local | |
| curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local |
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
| # This is SO gonna be my future resume! I sure am impressed, Mr. Grigorik. | |
| class Student < ActiveRecord::Base | |
| has_one :passion, :conditions => "project.type = 'web'" | |
| has_many :skills, :through => :practice | |
| has_many :relevant_courses, :through => :university, :include => :group_work | |
| has_and_belongs_to_many :projects, :through => :github, :foreign_key => "github.com/username" | |
| validates_presence_of :agile_team | |
| validates_presence_of :innovation | |
| validates_presence_of :learning_opportinities |
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
| d = BkAccount.find(:first, :conditions => {:name => "Kasse"}) | |
| c = BkAccount.find(:first, :conditions => {:name => "Budget 1"}) | |
| record = Record.new(:credit => c, | |
| :debit => d, | |
| :amount => 100) | |
| record.description= "BüroPapier" | |
| record.commit!() | |