Skip to content

Instantly share code, notes, and snippets.

@drldcsta
drldcsta / .vimrc
Created August 21, 2013 20:35
.vimrc
"Turn on line numbering
set number
"Enable syntax highlighting
syntax enable
"Start scrolling 14 lines from edge
set so=14
" Control character highlighting.
"Inserts ↵ at EOL and denotes hard tabs with ⇥⇥
set list listchars=tab:⇥⇥,eol:↵
" Tab settings.
@drldcsta
drldcsta / gist:6140080
Created August 2, 2013 13:56
How I learned to stop worrying and learned to love awk
d@AirBox:~/FX.tmp$ time (printf "Date Time,Try,Succ\n";awk 'BEGIN{OFS=",";SUBSEP=","}
$7 == 17018 {try[$1,substr($2,1,5)]++ ; D[$1,substr($2,1,5)]++}
$7 == 17030 {suc[$1,substr($2,1,5)]++ ; D[$1,substr($2,1,5)]++}
END{
for (X in D) print X,try[X],suc[X]
}' manager.log|sort -M)|head
Date Time,Try,Succ
07/31/13,20:00,207,192
07/31/13,20:01,218,215
07/31/13,20:02,166,163