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
# kudos to https://github.com/drewlesueur | |
# stolen from here: https://github.com/blog/266-fast-forward-your-fork#comment-11535 | |
git checkout -b upstream/master | |
git remote add upstream git://github.com/documentcloud/underscore.git | |
git pull upstream master | |
git checkout master // [my master branch] | |
git merge upstream/master | |
git push origin master |
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
%%% File : ahocorasik.erl | |
%%% Author : Fyodor Ustinov <ufm@ufm.su> | |
%%% Descrip.: Multiple search based on Aho-Corasick string matching algorithm | |
%%% | |
%%% License : GPL | |
%%% | |
%%% Usage: | |
%%% ahocorasik:match(["pat1", "pat2"], "pat1 pat2 pat1") | |
%%% or | |
%%% Tree = ahocorasik:tree(["pat1", "pat2"]) |
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
require "singleton" | |
require "socket" | |
ACCEPT_EVENT = 0x01 | |
RECEIVE_EVENT = 0x02 | |
WRITE_EVENT = 0x04 | |
# Y_EVENT = 0x08 | |
# Z_EVENT = 0x10 | |
# Etc. |