I hereby claim:
- I am tanob on github.
- I am tanob (https://keybase.io/tanob) on keybase.
- I have a public key ASDVxZL8l05sn52Pu3LWoyWVgGyi8eN4NQIzNyvB6lSyygo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| server: | |
| image: gocd/gocd-server | |
| hostname: go-server # Needed so the go-agent can find the server | |
| ports: | |
| - '8153:8153' | |
| - '8154:8154' | |
| agent: | |
| image: gocd/gocd-agent | |
| links: | |
| - server |
| import org.gradle.api.Project | |
| class CommandRunner { | |
| private final Project project | |
| def CommandRunner(Project project) { | |
| this.project = project | |
| } | |
| public String run(Object... args) { |
| #!/usr/bin/env ruby | |
| input_map = IO.readlines(ARGV[0]).inject({}) do |memo, line| | |
| field_name, fstart, fend = line.match(/(\S+)\s+([0-9]+)-([0-9]+)/).captures | |
| range = Range.new(fstart.to_i, fend.to_i) | |
| memo.merge({field_name => range}) | |
| end | |
| class Parser | |
| attr_accessor :line |
| -- Make: ghc --make groups.hs | |
| -- Run: echo -e "[4,3,3,2]\n[5,3,2,1,1,3,5]\n[4,5]" | ./groups | |
| import System.IO | |
| import Data.List | |
| isSameSolution f (s1,s2) = f == (s2,s1) | |
| discardDuplicated = nubBy isSameSolution | |
| uniqueSubsequences = filter ((/=0).length) . nub . subsequences | |
| solutionsFor list = discardDuplicated solutions |
| Parsing... | |
| macro.mirah | |
| Inferring types... | |
| Inference Error: | |
| Could not infer typing for nodes: | |
| FunctionalCall(find_class) | |
| Call(parent) | |
| Field(call) at line 14 (child of LocalAssignment(name = class_node, scope = MethodDefinition(_expand), captured = false)) | |
| macro.mirah:12: Could not infer typing for nodes: | |
| FunctionalCall(find_class) |
| -- Stefan van den Oord, 2010-12-29 | |
| -- The "cd to" command for iTerm2 | |
| -- Original from: http://code.google.com/p/iterm2/wiki/AppleScript | |
| -- Modified to open a new tab instead of a new window | |
| tell application "Finder" | |
| set _cwd to POSIX path of ((folder of (front window)) as alias) | |
| end tell | |
| tell application "iTerm" |
| fizz n = n `mod` 3 == 0 | |
| buzz n = n `mod` 5 == 0 | |
| fizzbuzzFor n | fizz n && buzz n = "fizzbuzz" | |
| | fizz n = "fizz" | |
| | buzz n = "buzz" | |
| | otherwise = show n | |
| main = mapM_ (putStrLn . fizzbuzzFor) [1..100] |
| import Data.Char;h 1 _=1;h x m|any(==x)m=0;h x m=h(sum$map((^2).digitToInt)$show x)(x:m);main=print$h 7 [] |