App.Router.map(function(match) {
match('/').to('index');
match('/about').to('about');
match('/contributor/:contributor_id').to('contributor');
});
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
| " Strip trailing whitespace | |
| function! <SID>StripTrailingWhitespaces() | |
| " Preparation: save last search, and cursor position. | |
| let _s=@/ | |
| let l = line(".") | |
| let c = col(".") | |
| " Do the business: | |
| %s/\s\+$//e | |
| " Clean up: restore previous search history, and cursor position | |
| let @/=_s |
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
| root@server:~# export CMDTEST='su cpfcnpj_mhfs_com_br -c "/usr/local/bin/unicorn -D -E production -c config/unicorn.rb"' | |
| root@server:~# echo $CMDTEST | |
| su cpfcnpj_mhfs_com_br -c "/usr/local/bin/unicorn -D -E production -c config/unicorn.rb" | |
| root@server:~# $CMDTEST | |
| su: invalid option -- 'D' | |
| U |
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
| ➜ s6-e1 % rails s | |
| /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/dependency.rb:52:in `initialize': Valid types are [:development, :runtime], not nil (ArgumentError) | |
| from /Users/mhfs/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/resolver.rb:359:in `new' | |
| from /Users/mhfs/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/resolver.rb:359:in `search' | |
| from /Users/mhfs/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/resolver.rb:354:in `gems_size' | |
| from /Users/mhfs/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/resolver.rb:179:in `resolve' | |
| from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/source_index.rb:95:in `sort_by' | |
| from /Users/mhfs/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/resolver.rb:175:in `each' | |
| from /Users/mhfs/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/resolver.rb:175:in `sort_by' | |
| from /Users/mhfs/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/resolv |
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
| bash -c ' | |
| if [ ! -f /usr/local/bin/chef-client ]; then | |
| apt-get update | |
| apt-get -y upgrade | |
| apt-get install -y build-essential wget zlib1g-dev libssl-dev libffi-dev | |
| cd /usr/src | |
| wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p180.tar.bz2 | |
| tar xjf ruby-1.9.2-p180.tar.bz2 | |
| cd ruby-1.9.2-p180 | |
| ./configure |
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
| # 1 | |
| class Blah | |
| private | |
| def method1 | |
| end | |
| def method2 |
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
| create table unique_test ( | |
| number integer not null, | |
| active boolean not null | |
| ) | |
| create unique index unique_test_index on unique_test(number, boolean) where active; | |
| insert into unique_test values (1, true); | |
| insert into unique_test values (1, true); | |
| -- ERROR: duplicate key value violates unique constraint "unique_test_index" |
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
| /* | |
| As of version 1.1.2, Propane will load and execute the contents of | |
| ~Library/Application Support/Propane/unsupported/caveatPatchor.js | |
| immediately following the execution of its own enhancer.js file. | |
| You can use this mechanism to add your own customizations to Campfire | |
| in Propane. | |
| Below you'll find two customization examples. |
- full presentation: public.jm3.net
- alternatively: 140proof.github.io/d3-drift
- view Bl.ock: bl.ocks.org/jm3/9768799
- view Gist: gist.github.com/jm3/9768799
I hereby claim:
- I am mhfs on github.
- I am mhfs (https://keybase.io/mhfs) on keybase.
- I have a public key whose fingerprint is 6F4B 7528 9C6B D712 7562 5153 D63A B713 961C 0AB5
To claim this, I am signing this object: