Skip to content

Instantly share code, notes, and snippets.

💭
¯\_(ツ)_/¯

Marc Falzon falzm

💭
¯\_(ツ)_/¯
Block or report user

Report or block falzm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@falzm
falzm / .json
Last active Oct 4, 2015
Shortest track duration
View .json
{
"took" : 8,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 8392,
@falzm
falzm / .json
Created Oct 3, 2015
10 Most played tracks
View .json
{
"took" : 16,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 8486,
@falzm
falzm / .json
Last active Oct 4, 2015
Top 10 most albums per artist/band
View .json
{
"took" : 32,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 8392,
@falzm
falzm / itunes2json.py
Last active Oct 4, 2015
Convert iTunes exported library to JSON
View itunes2json.py
#!/usr/bin/env python
from __future__ import print_function
from pprint import pprint
import json
import plistlib as plist
import sys
@falzm
falzm / riq.go
Created Aug 15, 2015
RIQ - Riemann Index Query
View riq.go
package main
import (
"flag"
"fmt"
"os"
"time"
"github.com/amir/raidman"
)
@falzm
falzm / collectd_mariadb_tablestats.py
Last active Apr 13, 2017
collectd-python module for reading MariaDB user statistics
View collectd_mariadb_tablestats.py
#!/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
@falzm
falzm / libbeat-output-riemann.go
Created Jul 31, 2015
libbeat-output-riemann.go
View libbeat-output-riemann.go
package riemann
import (
"fmt"
"net"
"reflect"
"strconv"
"time"
"github.com/elastic/libbeat/common"
@falzm
falzm / online_rpn.py
Created Jun 16, 2015
List Online.net RPN groups
View online_rpn.py
#!/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 / gist:0e005af9adaebacf9586
Last active Aug 29, 2015
Gory hack to download a GPG key from a keyserver in HTTP
View gist:0e005af9adaebacf9586
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 / gist:5865546c0e7d1ca425e0
Last active Aug 29, 2015
Vim shortcut: move current line up/down
View gist:5865546c0e7d1ca425e0
" Variation of https://coderwall.com/p/0cn9tq/move-lines-in-vim-like-phpstorm
" <shift> + <up> moves the current line up
" <shift> + <down> moves the current line down
nnoremap <silent> <S-up> ddkP<CR>k
nnoremap <silent> <S-down> ddp<CR>k
You can’t perform that action at this time.