This file contains hidden or 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 hidden or 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 hidden or 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" | |
"fmt" | |
"os" | |
"regexp" | |
) | |
func main() { |
This file contains hidden or 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 hidden or 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
curl -s 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xD8576A8BA88D21E9' | sed -n '/-----BEGIN PGP PUBLIC KEY BLOCK-----/,/-----END PGP PUBLIC KEY BLOCK-----/p' | |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: SKS 1.1.4 | |
Comment: Hostname: keyserver.ubuntu.com | |
mQENBFIOqEUBCADsvqwefcPPQArws9jHF1PaqhXxkaXzeE5uHHtefdoRxQdjoGokHFmHWtCd | |
9zR7hDpHE7Q4dwJtSFWZAM3zaUtlvRAgvMmfLm08NW9QQn0CP5khjjF1cgckhjmzQAzpEHO5 | |
jiSwl0ZU8ouJrLDgmbhT6knB1XW5/VmeECqKRyhlEK0zRz1aXV+4EVDySlORmFyqlmdIUmiU | |
1/6pKEXyRBBVCHNsbnpZOOzgNhfMz8VE8Hxq7Oh81qFaFXjNGCrNZ6xr/DI+iXlsZ8urlZjk | |
e5llm4874N8VPUeFQ/szmsbSqmCnbd15LLtrpvpSMeyRG+LoTYvyTG9QtAuewL9EKJPfABEB |
This file contains hidden or 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/env python | |
import re | |
import httplib | |
import json | |
import sys | |
def query_api(uri): | |
conn = httplib.HTTPSConnection('api.online.net') | |
conn.request('GET', |
This file contains hidden or 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 hidden or 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 ( | |
"flag" | |
"fmt" | |
"os" | |
"time" | |
"github.com/amir/raidman" | |
) |
This file contains hidden or 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/env python | |
from __future__ import print_function | |
from pprint import pprint | |
import json | |
import plistlib as plist | |
import sys | |
This file contains hidden or 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, |
OlderNewer