Skip to content

Instantly share code, notes, and snippets.

View falzm's full-sized avatar
🙃

Marc Falzon falzm

🙃
View GitHub Profile
@falzm
falzm / commonlog2json.go
Last active August 29, 2015 14:08
Quick'n dirty HTTP combined access log JSON formatter
package main
import (
"bufio"
"fmt"
"os"
"regexp"
)
func main() {
@falzm
falzm / gist:6433872
Created September 4, 2013 07:44
Colorized manpages with less
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
@falzm
falzm / ncsa_stats.awk
Created July 30, 2013 20:44
A poor man's NCSA log analyzer written in (G)AWK
# My first GAWK script
{
total_bytes += $10
}
$9 ~ /2[0-9]+/ {
n_sc_2xx++
}