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
{ | |
"took" : 32, | |
"timed_out" : false, | |
"_shards" : { | |
"total" : 1, | |
"successful" : 1, | |
"failed" : 0 | |
}, | |
"hits" : { | |
"total" : 8392, |
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
# My first GAWK script | |
{ | |
total_bytes += $10 | |
} | |
$9 ~ /2[0-9]+/ { | |
n_sc_2xx++ | |
} |
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
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' |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# collectd-python module for reading MariaDB user statistics | |
# Author: Marc Falzon | |
# | |
# Requirements: | |
# * MariaDB >= 5.2.0 with user statistics enabled | |
# (see https://mariadb.com/kb/en/mariadb/user-statistics/) | |
# * collectd compiled with Python module |
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
package main | |
import "fmt" | |
import "time" | |
func main() { | |
commonlogDateFormat := "2/Jan/2006:15:04:05 -0700" | |
iso8601DateFormat := "2006-01-02T15:04:05-07:00" | |
parsedDate, err := time.Parse(commonlogDateFormat, "18/Oct/2014:08:53:14 +0200") |
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
{ | |
"took" : 16, | |
"timed_out" : false, | |
"_shards" : { | |
"total" : 1, | |
"successful" : 1, | |
"failed" : 0 | |
}, | |
"hits" : { | |
"total" : 8486, |
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
# This example uses the Exoscale provider: | |
# https://github.com/exoscale/terraform-provider-exoscale/ | |
locals { | |
zone = "ch-gva-2" | |
key_pair = "default" | |
hostnames = [ | |
"ch2771-test1", | |
"ch2771-test2", |
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
package main | |
import ( | |
"os" | |
"github.com/bogem/id3v2" | |
) | |
func main() { | |
tag, err := id3v2.Open(os.Args[1], id3v2.Options{Parse: true}) |
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
package main | |
import ( | |
"log" | |
"net" | |
"os" | |
"time" | |
) | |
var ( |
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
package main | |
import ( | |
"bufio" | |
"bytes" | |
"fmt" | |
"net/http" | |
"net/http/httputil" | |
"os" | |
) |