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
* install git-annex on mac os x 10.8.4 | |
# cabal -v install --ghc-options=-L/usr/lib git-annex |
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
<?php | |
$input = isset($argv[1]) ? $argv[1] : 'fb.com/username'; | |
$pattern = '#(?:https?\://)?(?:www\.)?(?:facebook|fb)\.com/(\d+|[A-Za-z0-9\.]+)/?#'; | |
var_dump(preg_match($pattern, $input, $matches)); | |
var_dump($matches); |
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
Prelude Data.Char> mapM_ (putChar . chr) [0..127] |
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 System.Directory | |
import System.IO | |
testFileSize :: String -> Int -> IO () | |
testFileSize filepath size = do | |
writeFile filepath $ replicate size '\0' | |
openFile filepath ReadMode >>= hFileSize >>= putStrLn.show |
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
<?php | |
// cascading configurations via | |
// merging with defaults options | |
$defaults = array( | |
'foo' => 'bar', | |
'baz' => 'qux', | |
'quux' => 'fred', | |
); |
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
(format t "Hello World!") |
NewerOlder