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
$ riak-admin bucket-type create --help | |
--help created | |
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 PI where | |
import Data.Number.CReal | |
import Data.List | |
fractPartToBase :: RealFrac x => Int -> x -> [Int] | |
fractPartToBase base x = unfoldr f x | |
where f d = Just (d'int, d' - fromIntegral d'int) | |
where d' = d * fromIntegral base |
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
Betty:fake lelf$ cabal --version | |
cabal-install version 1.22.6.0 | |
using version 1.22.4.0 of the Cabal library | |
Betty:fake lelf$ cabal install "mtl-2.2.1" "text-1.2.1.1" "hashable-1.2.3.3" "parsec-3.1.9" "scientific-0.3.3.8" "kill-me-666.666" | |
Resolving dependencies... | |
All the requested packages are already installed: | |
hashable-1.2.3.3 | |
mtl-2.2.1 | |
parsec-3.1.9 |
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
Betty:fake lelf$ cabal install "mtl-2.2.1" "text-1.2.1.1" "hashable-1.2.3.3" "parsec-3.1.9" "scientific-0.3.3.8" "attoparsec-0.13.0.0" | |
Resolving dependencies... | |
All the requested packages are already installed: | |
hashable-1.2.3.3 | |
mtl-2.2.1 | |
parsec-3.1.9 | |
scientific-0.3.3.8 | |
text-1.2.1.1 | |
Use --reinstall if you want to reinstall anyway. |
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
Betty:flamingra lelf$ cabal configure | |
Resolving dependencies... | |
Configuring flamingra-0.1.0.0... | |
Betty:flamingra lelf$ cabal haddock --html-location='/package/$pkg-$version/docs' --contents-location='/package/$pkg-$version' | |
Running Haddock for flamingra-0.1.0.0... | |
Preprocessing library flamingra-0.1.0.0... | |
Haddock coverage: | |
0% ( 0 / 1) in 'I'mHereOnlyToPleaseHaddock' | |
Documentation created: dist/doc/html/flamingra/index.html |
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
> {-# LANGUAGE RankNTypes, DataKinds, KindSignatures, GADTs #-} | |
> import Unsafe.Coerce | |
> data M = A | B deriving (Show, Eq) | |
> data V1 :: M -> * where | |
> V1A :: Int -> V1 A | |
> V1B :: Double -> V1 B | |
> V1a :: () -> V1 a |
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
[lelf@dragon ~]$ echo 11111111 > myfile | |
[lelf@dragon ~]$ sync | |
[lelf@dragon ~]$ echo 22222222 >> myfile | |
[lelf@dragon ~]$ sync | |
[lelf@dragon ~]$ hammer history myfile | |
myfile 00000001073a3ee6 clean { | |
00000001073abc60 08-Dec-2013 23:05:34 | |
00000001073abd20 08-Dec-2013 23:05:47 | |
} |
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
#include <stdio.h> | |
int result_c (int max_a0, int *max_len_r, int *longest_r) { | |
int longest = 0, max_len = 0; | |
int a0, len; | |
unsigned long a; | |
for (a0 = 1; a0 <= max_a0; a0++) { | |
a = a0; | |
len = 0; |
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
{-# LANGUAGE ForeignFunctionInterface #-} | |
import System.Environment | |
import qualified Data.Vector as V | |
import Control.Monad (join) | |
import Data.Word | |
import Criterion.Main | |
import Foreign.C | |
import Foreign.Marshal | |
import Foreign.Ptr |
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
use Modern::Perl; | |
while (<>) { | |
# Kill | |
s{<abr>\w+</abr> \s+ <rref>.*wav</rref>}{}xg; | |
s{<rref>.*\.(wav|jpg)</rref>}{}g; | |
# Head | |
s{<k>.*</k>}{}; |