Skip to content

Instantly share code, notes, and snippets.

View jraregris's full-sized avatar

Oddmund Strømme jraregris

View GitHub Profile
@jraregris
jraregris / bash.bat
Created September 21, 2012 09:29
Git-BASH (mingw32) with Visual Studio enviroment
@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
*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
// 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>
{"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"=>"",
⮁ 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
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
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