Skip to content

Instantly share code, notes, and snippets.

View clonejo's full-sized avatar

Feiko Nanninga clonejo

  • Aachen / Leer, Germany
View GitHub Profile
$ ./durstlöscher.py search mate -f
searching for "mate"
0. 21507 Charitea Mate 20x0,33l 26,70 €
1. 21480 Flora Power Mate 20x0,5l 19,99 €
2. 21303 Club Mate Winter 20x0,5l 16,79 €
3. 21231 Club Mate Kraftstoff Ice Tea 20x0,5L 16,79 €
4. 21230 Flora Power Mate 24x0,33L 17,99 €
5. 21202 Club Mate Granatapfel 20x0,5L 16,79 €
6. 21150 Club-Mate Kola 20x0,33 15,99 €
7. 21103 Leet Mate 20x0,5L 19,99 €
@clonejo
clonejo / gist:b4fd3a596e90e54b573038ef0ede17d1
Created July 15, 2016 19:23
Musicbrainz Picard Naming Scheme (artist/year-album/(disk-)trackno-title)
f2(%albumartist%,%artist%)/$if($ne(%albumartist%,),$if($ne(%date%,),$left(%date%,4)-)%album%/)$if($gt(%totaldiscs%,1),%discnumber%-,)$if($ne(%albumartist%,),$num(%tracknumber%,2) ,)$if(%_multiartist%,%artist% - ,)%title%
@clonejo
clonejo / mqtt-publish-time.py
Last active June 15, 2016 10:04
python 2 script which publishes the current unix timestamp to mqtt at regular intervals
#!/usr/bin/env python2
import paho.mqtt.client as mqtt
import time
import math
interval = 60
mqttc = mqtt.Client()
mqttc.connect("mqtt.space.aachen.ccc.de")
@clonejo
clonejo / download_zeal_user_docsets.py
Last active May 23, 2018 06:18 — forked from wenLiangcan/download_zeal_user_docsets.py
A solution to the lack of UI for Dash's user docsets in Zeal. Uses Python 3 and easygui (pip3 install easygui)
#!/bin/python3
import json
import os
import tarfile
import urllib.request
import configparser
import easygui
use std::any::Any;
use std::cmp::min;
use std::str;
use db::DbCon;
use db;
use rustc_serialize::json::{Json, Object, ToJson};
use std::sync::{Arc, Mutex};
use std::io::Read;
use model::{json_to_object, Action};
┌─(~/code/clubstatusd)───────────────────────────────────────────────────────────────────(clonejo@clonejo-thinkpad)─
└──> ls target/debug/ -lh
total 12M
drwxr-xr-x 14 clonejo users 4.0K Jan 6 11:46 build
-rwxr-xr-x 1 clonejo users 12M Jan 10 02:44 clubstatusd
drwxr-xr-x 2 clonejo users 12K Jan 6 11:51 deps
drwxr-xr-x 2 clonejo users 4.0K Nov 12 19:33 examples
drwxr-xr-x 2 clonejo users 4.0K Nov 12 19:33 native
┌─(~/code/clubstatusd)───────────────────────────────────────────────────────────────────(clonejo@clonejo-thinkpad)─
└──> cargo build --release
#!/bin/python2
import pygame
import itertools
import random
import math
# Initialize the game engine
pygame.init()
# Define some colors
@clonejo
clonejo / gist:ab08a8bbda4c80731b0e
Last active December 21, 2015 16:52
Stackexchange spoiled Star Wars for me …
.stackexchange.com###hot-network-questions
stackoverflow.com###hot-network-questions
serverfault.com###hot-network-questions

The backend's code is now on Github, as are the specs.

use std::rt::io::Reader;
use std::rt::io::mem::MemReader;
use std::rt::io::extensions::ReaderByteConversions;
fn read<T: Reader>(reader: &mut T) -> u8 {
reader.read_u8_()
}
fn main() {
let mut reader = ~MemReader::new(~[17u8, 1u8, 3u8]);