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
class StrangeOperatorBehavior | |
def doit | |
some_array << [3,4] # ok | |
some_array += [6,7] # nil | |
end | |
def some_array | |
@some_array ||= [] | |
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
ABOUT: | |
small build monitor using MacRuby and Growl | |
RUN: | |
macruby tci.rb | |
CONFIG: |
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 :rubygems | |
gem "rails", "3.1.0.rc5" | |
gem "activeadmin", "0.2.2" |
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
Day job: Rails Freelancer in Hamburg Germany | |
Your Rails contributions (if any): Redis & File Caching Plugins, ActiveService Plugin | |
What's your Ruby/Rails experience?: Ruby since 2009, Rails since 2010 | |
How do you use GitHub?: GitHub for Mac, Browsing Code on Web, Selective Watching and Forking |
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
paule@phoet:~/Documents/ruby/faselcharts±master×$ bundle --version | |
Bundler version 1.1.pre.7 | |
paule@phoet:~/Documents/ruby/faselcharts±master×$ bundle install | |
Fetching dependency information from the API at http://rubygems.org/........ | |
Fetching dependency information from the API at http://rubygems.org/. | |
Using rake (0.9.2) | |
[...] | |
Installing activeadmin (0.2.2) | |
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. |
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
git log | grep -B2 "Sandra Weddig" | grep commit | cut -d" " -f2 | xargs git revert $1 |
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
class Object;def fail!;raise "#{self}";end;end | |
"i want to be raised".fail! | |
# object.rb:1:in `fail!': i want to be raised (RuntimeError) | |
# from object.rb:3 |
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
# config/initializers/char_converter.rb | |
require 'uri' | |
module Support | |
class CharConverter | |
def initialize(app) | |
@app = app | |
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
if Rails.env.development? | |
module My | |
module PartialRenderer | |
def render(context, options, block) | |
msg = "rendering '#{options[:partial]}' with locals '#{(options[:locals] || {}).keys}'" | |
"<!-- start #{msg}-->\n#{super(context, options, block)}\n<!-- end #{msg}-->\n".html_safe | |
end | |
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
rake gemcutter:import:process /Users/paule/.rvm/gems/ruby-1.9.3-p0/cache/ --trace | |
** Invoke gemcutter:import:process (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
** Execute gemcutter:import:process | |
Processing 94 gems... | |
Processing /Users/paule/.rvm/gems/ruby-1.9.3-p0/cache/yajl-ruby-1.1.0.gem | |
Processing /Users/paule/.rvm/gems/ruby-1.9.3-p0/cache/xpath-0.1.4.gem | |
Processing /Users/paule/.rvm/gems/ruby-1.9.3-p0/cache/xml-simple-1.1.1.gem | |
Processing /Users/paule/.rvm/gems/ruby-1.9.3-p0/cache/will_paginate-3.0.2.gem |