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:0e005af9adaebacf9586
Last active August 29, 2015 14:15
Gory hack to download a GPG key from a keyserver in HTTP
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
@falzm
falzm / online_rpn.py
Created June 16, 2015 15:05
List Online.net RPN groups
#!/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',
@falzm
falzm / riq.go
Created August 15, 2015 10:01
RIQ - Riemann Index Query
package main
import (
"flag"
"fmt"
"os"
"time"
"github.com/amir/raidman"
)
@falzm
falzm / .json
Created October 4, 2015 10:56
Longest single album duration
{
"took" : 59,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 8486,
@falzm
falzm / .json
Created October 4, 2015 11:51
Top 10 longest album durations
{
"took" : 63,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 8486,
@falzm
falzm / .json
Created October 4, 2015 12:27
Largest single album in tracks number
{
"took" : 8,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 8486,
@falzm
falzm / .json
Created October 4, 2015 13:03
Longest combined music duration per artist
{
"took" : 21,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 8392,
@falzm
falzm / .json
Last active October 4, 2015 13:43
Shortest track duration
{
"took" : 8,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 8392,
@falzm
falzm / .json
Last active October 4, 2015 13:44
Longest track duration
{
"took" : 7,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 8392,