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
fib :: Integer -> Integer | |
fib 0 = 0 | |
fib 1 = 1 | |
fib x = fib (x - 1) + fib (x - 2) |
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
import Data.List | |
import Data.Maybe | |
collatz :: Int -> [Int] | |
collatz 1 = [1] | |
collatz x | |
| even x = [x] ++ (collatz $ x `div` 2) | |
| otherwise = [x] ++ (collatz $ 3 * x + 1) | |
longestLengthOfCollatz :: Int |
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
g :: [a] -> [a] | |
g xs = tail $ tail $ tail $ tail xs | |
f :: [Int] -> [Int] | |
f xs = take 10 $ map (*3) $ filter even xs | |
sqrtSums :: Int | |
sqrtSums = (1+) $ length $ takeWhile (<1000) $ scanl1 (+) $ map sqrt [1..] |
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
g :: [a] -> [a] | |
g = tail . tail . tail . tail | |
f :: [Int] -> [Int] | |
f = take 10 . map (*3) . filter even | |
sqrtSums :: Int | |
sqrtSums = (1+) . length . takeWhile (<1000) . scanl1 (+) $ map sqrt [1..] |
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
f :: Int -> Int | |
f = (1+) . (2*) | |
g :: Int -> Int -> Int | |
g = (+) . (2*) | |
h :: Int -> [a] -> [a] | |
h = (fst .) . splitAt | |
i :: Ix a => (a,a) -> [a] |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use 5.012; | |
use WebService::Simple; | |
my $target_username = "plack"; # <= It's test var! Hehe. FIXME | |
my $target_reponame = "Plack"; # <= It's test var! Hehe. FIXME |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use 5.012; | |
use WebService::Simple; | |
my $target_username = "USER_NAME"; # <= input your self | |
my $target_reponame = "REPOSITORY_NAME"; # <= input your self |
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
div#watch7-discussion{ | |
display: none !important | |
} |
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
#res { | |
display: none; | |
} |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my $rvm_path = "~/.rvm/rubies"; | |
`rvm list` =~ /=.*?(ruby-.*?)\s\[/; | |
system("$rvm_path/$1/bin/ruby @ARGV"); |