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
describe Klassen do | |
describe metode do | |
it "should throw execption when given no parameters" do | |
... | |
end | |
it "should return whatever when given whatever" do | |
... | |
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
def digit_sum n | |
n > 9 ? n.to_s.chars.map{ |i| digit_sum(i.to_i) }.inject(:+) : n | |
end | |
def accumulative_sum n | |
(1..n).map{|i| digit_sum i}.inject(:+) | |
end | |
puts accumulative_sum 11 |
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
⮁ pry | |
[1] pry(main)> class Parent | |
[1] pry(main)* private | |
[1] pry(main)* def honk | |
[1] pry(main)* puts "hooonk" | |
[1] pry(main)* end | |
[1] pry(main)* end | |
=> :honk | |
[2] pry(main)> class Child < Parent | |
[2] pry(main)* 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
{"repository"=> | |
{"url"=>"https://github.com/izzm/Squat-cafe", | |
"has_downloads"=>true, | |
"created_at"=>"2012/01/15 04:15:11 -0800", | |
"has_issues"=>true, | |
"description"=>"", | |
"forks"=>1, | |
"fork"=>false, | |
"has_wiki"=>true, | |
"homepage"=>"", |
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
// Type: System.Collections.Generic.IEnumerable`1 | |
// Assembly: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
// Assembly location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll | |
using System.Collections; | |
using System.Runtime.CompilerServices; | |
namespace System.Collections.Generic | |
{ | |
/// <summary> |
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
*font: -*-terminus-*-*-*-*-16-*-*-*-*-*-*-* | |
urxvt.scrollBar: false | |
urxvt.loginShell: true | |
URxvt.perl-ext-common: default,url-select | |
URxvt.keysym.M-u: perl:url-select:select_next | |
URxvt.urlLauncher: firefox | |
URxvt.underlineURLs: true |
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
@echo off | |
@REM Select the latest VS Tools | |
IF EXIST %VS110COMNTOOLS% ( | |
CALL "%VS110COMNTOOLS%\vsvars32.bat" | |
GOTO :start_term | |
) | |
IF EXIST %VS100COMNTOOLS% ( | |
CALL "%VS100COMNTOOLS%\vsvars32.bat" | |
GOTO :start_term |
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
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" Bundles: | |
Bundle 'gmarik/vundle' | |
Bundle 'Lokaltog/vim-powerline' | |
Bundle 'Lokaltog/vim-distinguished' |
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
module Accordion | |
TONES = ['C ', 'C#', 'D ', 'D#', 'E ', 'F ', 'F#', 'G ', 'G#', 'A ', 'A#', 'B '] | |
def get_tone t | |
TONES[t%12] | |
end | |
def rel tone, dist | |
get_tone((TONES.find_index(tone) + dist) % 12) | |
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
➜ ~ git clone git://github.com/sstephenson/rbenv.git .rbenv | |
Cloning into '.rbenv'... | |
remote: Counting objects: 1040, done. | |
remote: Compressing objects: 100% (418/418), done. | |
remote: Total 1040 (delta 649), reused 961 (delta 594) | |
Receiving objects: 100% (1040/1040), 138.42 KiB, done. | |
Resolving deltas: 100% (649/649), done. | |
➜ ~ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshenv | |
➜ ~ echo 'eval "$(rbenv init -)"' >> ~/.zshenv | |
➜ ~ echo 'eval "$(rbenv init -)"' >> ~/.zshenv |
NewerOlder