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
# open each file edited on last commit on vim tab | |
# git show head --name-only --oneline -> show files | |
# tail -n +2 -> cut first line (commit hash) | |
# tr '\n' ' ' -> replace break line to space | |
# vi -p open each file (space sep) on tab | |
vi -p $(git show head --name-only --oneline | tail -n +2 | tr '\n' ' ') |
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(encode_uri_rfc3986). | |
-author('Renato Albano <[email protected]>'). | |
-export([encode/1]). | |
%% Taken from <http://erlangexamples.com/>, | |
%% from <http://github.com/CapnKernul/httparadise> | |
%% and <http://www.erlang.org/doc/man/edoc_lib.html> | |
encode([C | Cs]) when C >= $a, C =< $z -> |
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
# sinatra twitter client with oauth | |
require 'rubygems' | |
require 'sinatra' | |
# use http://github.com/moomerman/twitter_oauth gem | |
# gem sources -a http://gems.github.com | |
# gem install moomerman-twitter_oauth | |
require 'twitter_oauth' |
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
/**** | |
RFC822 Email Address Regex | |
Translated to Javascript by Renato Albano | |
http://tfletcher.com/lib/rfc822.rb | |
http://iamcal.com/publish/articles/php/parsing_email/ | |
Licensed under a Creative Commons Attribution-ShareAlike 2.5 License |
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(mod_iqtest). | |
-behaviour(gen_mod). | |
-export([ | |
start/2, stop/1, | |
process_sm_iq/3 | |
]). | |
-include("ejabberd.hrl"). | |
-include("jlib.hrl"). |
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
# How Not To Sort By Average Rating | |
# url: http://www.evanmiller.org/how-not-to-sort-by-average-rating.html | |
# lib: http://blade.nagaokaut.ac.jp/~sinara/ruby/math/statistics2/ (need compile) | |
# statistics2 disabled | |
#require 'statistics2' | |
def ci_lower_bound(pos, n, power) | |
if n == 0 | |
return 0 |