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 Foo where | |
import System.IO | |
-- define fold | |
myfold :: (Num b) => [(t, b)] -> b | |
myfold ((t,b):xs) = foldr (\(t,b) x -> x + b) 0 ((t,b):xs) | |
-- define writing results to file |
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
(setq server-socket-dir "~/.emacs.d/server") | |
(server-start) |
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
#!/usr/bin/env ruby | |
puts `find -type f -name '*.php' | xargs perl -pi -w -e 's/#{ARGV[0]}/#{ARGV[1]}/g;'` |
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 OverloadedStrings #-} | |
import qualified System.ZMQ as ZMQ | |
import Data.Binary | |
import Data.Binary.Put | |
import Data.Binary.Get | |
import Data.ByteString.Lazy as LZ | |
import Data.ByteString as STR | |
import Data.Bson | |
import Data.Bson.Binary |
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
defaults write com.apple.dock workspaces-swoosh-animation-off -bool YES && killall Dock |
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(main). | |
-export([map/1]). | |
-export([main/0]). | |
-export([reducer_wrapper/1]). | |
-export([reducer/2]). | |
-define(NUMBER_OF_PARTITIONS, 100). | |
main() -> |
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
# Split MYSQL dump file | |
zcat dump.sql.gz | awk '/DROP TABLE IF EXISTS/{n++}{print >"out" n ".sql" }' | |
# Parallel import using GNU Parallel http://www.gnu.org/software/parallel/ | |
ls -rS *.sql | parallel --joblog joblog.txt mysql -uXXX -pYYY db_name "<" | |
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
<?php | |
// watch how the destructor is never called | |
set_time_limit(1); | |
class Foobar { | |
public function doIt() { | |
while(true) { |
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
# https://github.com/travis-ci/travis-ci/wiki/.travis.yml-options | |
target: erlang | |
use_rebar: true | |
erlang_otp: | |
- R14B03 | |
- R14B02 | |
- R14B01 | |
- R14B | |
- R14A | |
- R13B04 |
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
Hi, | |
Travis is an open, distributed build system for the Ruby community. | |
See http://travis-ci.org/. With the help of the Travis developers I | |
was able to add Erlang as a build target. Some examples: | |
Etorrent: http://staging.travis-ci.org/#!/wardbekker/etorrent/builds/3023 | |
Proper: http://staging.travis-ci.org/#!/wardbekker/proper | |
Zotonic: http://staging.travis-ci.org/#!/wardbekker/zotonic/builds/3107 |
OlderNewer