Skip to content

Instantly share code, notes, and snippets.

View JonnyJD's full-sized avatar

Johannes Dewender JonnyJD

View GitHub Profile
@JonnyJD
JonnyJD / querytest.py
Created March 22, 2012 13:23
python-musicbrain-ngs ad-hoc tests
import sys
import musicbrainzngs as m
def main():
m.set_useragent("application", "0.01", "http://example.com")
#print m.get_artist_by_id("952a4205-023d-4235-897c-6fdb6f58dfaa", [])
#print m.get_label_by_id("aab2e720-bdd2-4565-afc2-460743585f16")
#print m.get_release_by_id("e94757ff-2655-4690-b369-4012beba6114")
#print m.get_release_group_by_id("9377d65d-ffd5-35d6-b64d-43f86ef9188d")
#print m.get_recording_by_id("cb4d4d70-930c-4d1a-a157-776de18be66a")
@JonnyJD
JonnyJD / contributors.sh
Created April 19, 2012 02:11
list new contributors for a git branch (given a previous list)
#!/bin/sh
aliases=(aheadley Andrew "Two Words" "<mail@example.com>")
if [ $# -gt 0 ]; then
branch=$1
else
branch=master
fi
@JonnyJD
JonnyJD / PKGBUILD
Created April 5, 2013 17:41
python2-discid-local PKGBUILD to use a local git repository as "package"
# Maintainer: Johannes Dewender arch at JonnyJD dot net
pkgname=python2-discid-local
_pkgname=discid
_python=python2
pkgver=0.2.1
pkgrel=1
pkgdesc="Python binding of Libdiscid"
arch=('any')
url="https://python-discid.readthedocs.org/"
license=('LGPL3')
@JonnyJD
JonnyJD / password_test.py
Last active December 16, 2015 11:39
A test script intended to test authentication with a non-ascii password using python-musicbrainzngs. The code is inherited from isrcsubmit.py. Only parts irrelevant for this test are taken out.
#!/usr/bin/env python
agent_name = "password_test.py"
agent_version = "0.1"
# this script doesn't submit anything (empty dict)
# so testing this on live server (with live passwords) is okay.
musicbrainz_server = "test.musicbrainz.org"
#musicbrainz_server = "musicbrainz.org"
import sys
@JonnyJD
JonnyJD / Makefile
Last active December 20, 2015 09:09
Preliminary tests to implement drutil's optical disc drive numbering in C
disc_drive_numbers: disc_drive_numbers.c
${CC} $^ -framework CoreFoundation -framework IOKit -o $@
@JonnyJD
JonnyJD / Makefile
Created July 31, 2013 22:16
traversing the I/O registry on Mac OS X (iokit)
traverse_io_registry: traverse_io_registry.c
${CC} $^ -framework CoreFoundation -framework IOKit -o $@
@JonnyJD
JonnyJD / Makefile
Last active December 24, 2015 03:59
Disc ID calculation with gstreamer
CFLAGS=`pkg-config --cflags gstreamer-plugins-base-1.0`
LIBS=`pkg-config --libs gstreamer-plugins-base-1.0`
discid: discid.c
gcc -Wall $^ -o $@ $(CFLAGS) $(LIBS)
@JonnyJD
JonnyJD / showrelease.py
Last active December 24, 2015 13:09
This shows a disc in a drive on musicbrainz.org
#!/usr/bin/python
# Copyright 2009-2013 Johannes Dewender ( brainz at JonnyJD.net )
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@JonnyJD
JonnyJD / PKGBUILD
Created March 28, 2014 13:52
Arch Linux PKGBUILD for picard-local
# $Id: PKGBUILD 87401 2013-03-31 13:44:28Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Mateusz Herych <heniekk@gmail.com>
# Contributor: sysrq
pkgname=picard-local
_pkgname=picard
pkgver=1.2
pkgrel=1
pkgdesc='Official MusicBrainz tagger'
@JonnyJD
JonnyJD / mb_chatlogs.user.js
Last active August 29, 2015 14:02
Rassie's Chatlog scripts from http://rassie.org/mb_chatlogs.user.js with additional highlighting
// ==UserScript==
// @name MusicBrainz chatlogs
// @namespace http://dev.rassie.org
// @description Make Musicbrainz IRC logs readable
// @include http://chatlogs.musicbrainz.org/*
// ==/UserScript==
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message