Skip to content

Instantly share code, notes, and snippets.

View adamcik's full-sized avatar

Thomas Adamcik adamcik

View GitHub Profile
@adamcik
adamcik / transition.asc
Created December 19, 2017 16:56
GPG transition statement
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
2017-12-19
The following is my delayed transition statement, now that I'm about to revoke
the old key.
The old key was:

Keybase proof

I hereby claim:

  • I am adamcik on github.
  • I am adamcik (https://keybase.io/adamcik) on keybase.
  • I have a public key whose fingerprint is BFD4 7D24 FBFD 2692 1058 0923 9714 F97B 0CBE E929

To claim this, I am signing this object:

@adamcik
adamcik / gist:e69662f1ed054059bb8b
Created April 5, 2015 11:23
Deflect away from bug tracker copy paste text

We recently changed the contribution guidelines to make it clear that GitHub Issues is for bugs and well-defined feature requests only, ref. https://docs.mopidy.com/en/latest/contributing/#issue-guidelines

I don't want to kill your discussion. I just want to make the issue tracker a useful development tool by removing as many non-actionable issues as possible.

Can you please continue the discussion at https://discuss.mopidy.com? Feel free to post another comment here with the link to your continued discussion.

@adamcik
adamcik / gist:42d20e2ec66d02697fee
Created August 11, 2014 22:24
New mopidy.audio.player classes
class Player(object):
"""Main class responsible for gluing together our audio components.
This class should:
- Create the playbin element and set it up according to the config
- Connect the handlers event and message routers to the playbin
- Add an additional signal handlers for source-setup hooked up to proxy
setup and the appsrc.
@adamcik
adamcik / gist:5191999
Created March 18, 2013 23:33
Suggested format for mopidy config.
[logging]
console_format = %(levelname)-8s $(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
debug_file = mopidy.log
debug_thread = false
[audio]
mixer = autoaudiomixer
mixer_track =
output = autoaudiosink
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
GRUB_DEFAULT=0
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS1,115200n8"
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=1 --word=8 --parity=no --stop=1"
@adamcik
adamcik / manager.py
Created March 30, 2010 08:37
Custom manger to allow access to proper inet/cidr lookups
import re
from IPy import IP
from django import forms
from django.db import models, connection
from django.db.models import sql, query
from django.db.models.query_utils import QueryWrapper
from django.utils.encoding import force_unicode
from django.utils.safestring import mark_safe
<?php
require_once 'PHPUnit/Framework.php';
require_once 'untaint.php';
class IntTest extends PHPUnit_Framework_TestCase {
public function testValidInt() {
$data = array('foo' => 1, 'bar' => -9999999999);
$values = Untaint::check(array('foo'=>UNTAINT_INT, 'bar'=>UNTAINT_INT), $data);
#encoding: utf-8
import urllib
from django.db import connection
from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import render_to_response
def generate_ticket_pdf_url(purchase_id):