Skip to content

Instantly share code, notes, and snippets.

View GarstgerUnhold's full-sized avatar

Johannes Wollert GarstgerUnhold

View GitHub Profile
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
# 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
#
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'digest/md5'
require 'fastercsv'
require 'json'
require 'curb'
require 'pp'
data = []
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 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
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!()