Skip to content

Instantly share code, notes, and snippets.

View Hettomei's full-sized avatar
🎯
Focusing

Timothée Gauthier Hettomei

🎯
Focusing
  • Conserto
  • France
View GitHub Profile
@Hettomei
Hettomei / gist:b2c6ac05f3817b3547b3
Last active August 29, 2015 14:17
bench respond to vs rescue NoMethod
#Rehearsal ---------------------------------------
#old 4.600000 0.060000 4.660000 ( 4.653225)
#new 0.280000 0.000000 0.280000 ( 0.283112)
#------------------------------ total: 4.940000sec
#
# user system total real
#old 4.620000 0.070000 4.690000 ( 4.688474)
#new 0.280000 0.000000 0.280000 ( 0.283607)
@Hettomei
Hettomei / bech_proc_methodes.rb
Created February 26, 2015 13:25
Benchmark procedural vs splité en methode
#Rehearsal ---------------------------------------
#old 3.360000 0.000000 3.360000 ( 3.364614)
#new 4.790000 0.000000 4.790000 ( 4.787060)
#------------------------------ total: 8.150000sec
#
# user system total real
#old 3.380000 0.000000 3.380000 ( 3.376807)
#new 4.680000 0.000000 4.680000 ( 4.677751)
@Hettomei
Hettomei / recuring_search.sh
Created September 27, 2013 14:23
Une fonction que j'utilisais avant de connaitre Ack, placé dans le .zshrc
##find text 'test' il all '.txt' file recursively from current dir
#maybe ack do this like "cd to/the/dir ; ack --text test"
#example: grepall test txt
function grepall() {
echo "find text '$1'";
echo "In files << $2 >>";
grep -ni "$1" **/*.$2
}
@Hettomei
Hettomei / how_to_compile_vim.sh
Last active December 22, 2015 20:59
How I compile Vim on mac and link to homebrew
hg pull &&
hg update
make distclean &&
make clean &&
./configure --prefix=/usr/local/Cellar/vim/7.4 --enable-rubyinterp --enable-multibyte --with-features=huge &&
make &&
make install # STRIP=/usr/bin/true # Was needed before because any ":rubydo" turns in segfault
# when not linked in brew, only the first time do after install