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
| source "http://rubygems.org" | |
| gem "rake" |
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
| class BuildAllCommand | |
| def initialize(cli_options = {}) | |
| @cli_options = cli_options | |
| end | |
| def run | |
| threads = [] | |
| Dir["#{HOME}/config/*.yml"].each do |fn| | |
| fn =~ %r{#{HOME}/config/(.*).yml} | |
| application_name = $1 |
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
| // ==UserScript== | |
| // @name Move mingle comments | |
| // @namespace http://userscripts.org/users/135958 | |
| // @description Moves comments in mingle from the sidebar to a more prominant place | |
| // @include *mingle* | |
| // ==/UserScript== | |
| var cah = document.getElementById('comments-and-history'); | |
| cah.parentNode.removeChild(cah); | |
| var cc = document.getElementById('card-contents'); |
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
| cache.store(:key) { ExpensiveOperation.all } # lazy: pay cost on get | |
| cache.store!(:key) { ExpensiveOperation.all } # pay cost now | |
| # ---- OR ---- | |
| cache.store(:key) { ExpensiveOperation.all } # pay cost now | |
| cache.lazy_store(:key) { ExpensiveOperation.all } # lazy: pay cost on get |
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
| <?php | |
| $arr = array( | |
| 'members' => array( | |
| 'someQuestion', | |
| 'q2', | |
| 'lastThing' | |
| ) | |
| ); |
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
| <?php | |
| $arr = array( | |
| 'members' => array( | |
| 'someQuestion', | |
| 'q2', | |
| 'lastThing' | |
| ) | |
| ); |
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 File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
| describe MyModel do | |
| before do | |
| MyModel.create!(:name => 'foo') | |
| end | |
| it 'this passes' do | |
| MyModel.should be_exist(:name => 'foo') | |
| end | |
| it 'this also passes' do |
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
| sh: line 1: 7573 Segmentation fault bzr update /home/user/.cerberus/work/project_name/sources 2>&1 | |
| 'import site' failed; use -v for traceback | |
| Traceback (most recent call last): | |
| File "/usr/local/bin/bzr", line 21, in <module> | |
| import os | |
| File "/usr/local/lib/python2.5/os.py", line 44, in <module> | |
| from posix import * | |
| ImportError: from-import-* object has no __dict__ and no __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
| h = { | |
| :one => 1, | |
| :two => 2, | |
| :three => 3 | |
| } | |
| puts "-- *args" | |
| h.inject({}) do |*args| | |
| puts args.inspect | |
| break |
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
| # given these specs for a should_hide?(options={}) method | |
| describe 'utility methods' do | |
| describe 'should_hide?' do | |
| describe 'individual options' do | |
| describe 'show_when' # ... | |
| describe 'show_unless' # ... | |
| describe 'hide_when' # ... | |
| describe 'hide_unless' # ... | |
| end |