Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Timothée Gauthier Hettomei

🎯
Focusing
  • Conserto
  • France
View GitHub Profile
@Hettomei
Hettomei / gist:b2c6ac05f3817b3547b3
Last active Aug 29, 2015
bench respond to vs rescue NoMethod
View gist:b2c6ac05f3817b3547b3
#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 Feb 26, 2015
Benchmark procedural vs splité en methode
View bech_proc_methodes.rb
#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 Sep 27, 2013
Une fonction que j'utilisais avant de connaitre Ack, placé dans le .zshrc
View recuring_search.sh
##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 Dec 22, 2015
How I compile Vim on mac and link to homebrew
View how_to_compile_vim.sh
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
You can’t perform that action at this time.