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
| let mapleader="," | |
| "RVM | |
| set statusline+=%{exists('g:loaded_rvm')?rvm#statusline():''} | |
| set statusline+=%r "read only flag | |
| set statusline+=%m "modified flag | |
| set statusline+=%t "filename | |
| set statusline+=%= "left/right separator |
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
| CODE = [112,117,116,115,32,34,67,79,68,69,32,61,32,35,123,67,79,68,69,46,105,110,115,112,101,99,27,99,116,125,34, 10,67,79,68,69,46,101,97,99,104,32,123,124,99,124,32,112,114,105,110,116,32,99,46,99,104,114,32,125,10] | |
| puts "CODE = #{CODE.inspect}" | |
| CODE.each { |c| print c.chr } |
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
| wrong = -> | |
| countdown = 10 | |
| h = setInterval -> | |
| countdown-- | |
| , 100 | |
| do (->) until countdown is 0 | |
| clearInterval h | |
| console.log 'Surprise!' | |
| right = -> |
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
| countdown = 10 | |
| h = setInterval -> | |
| countdown-- | |
| , 100 | |
| do (->) until countdown is 0 | |
| clearInterval h | |
| console.log 'Surprise!' |
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
| countdown = 10 | |
| h = setInterval -> | |
| countdown-- | |
| if countdown is 0 | |
| console.log 'Surprise' | |
| clearInterval h | |
| , 100 |
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
| # Rock, paper and scissors with Node | |
| net = require 'net' | |
| hands = ['rock', 'paper', 'scissors'] | |
| win_rules = [ | |
| ['rock', 'scissors'], ['scissors', 'paper'], ['paper', 'rock'] | |
| ] | |
| human_wins = 0 |
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
| module Enumerable | |
| def find_value(&block) | |
| found = nil | |
| self.each do |e| | |
| found = block.call(e) | |
| return found if found | |
| end | |
| found | |
| end | |
| end |
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 'forwardable' | |
| class X | |
| def foo | |
| puts "foo!" | |
| end | |
| alias_method :bar, :foo | |
| end | |
| class Y < X |
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
| diff --git a/src/MacVim/mvim b/src/MacVim/mvim | |
| index 653cf78..5e6b0d7 100755 | |
| --- a/src/MacVim/mvim | |
| +++ b/src/MacVim/mvim | |
| @@ -13,6 +13,11 @@ | |
| # or by un-commenting and editing the following line: | |
| # VIM_APP_DIR=/Applications | |
| +tabs=true | |
| +if [ "$1" = "-f" ]; then |
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
| render partial: 'avatar', locals: { mood: 'depressed' } # works fine | |
| render 'avatar', locals: { mood: 'depressed' } # undefined local variable or method 'mood' (in the partial) | |