Skip to content

Instantly share code, notes, and snippets.

Christopher Arndt SpotlightKid

View GitHub Profile
@SpotlightKid
SpotlightKid / graph.py
Created Mar 19, 2019
Modelling source file dependencies with a graph in Python
View graph.py
# -*- coding: utf-8 -*-
"""A very basic general graph library."""
from __future__ import print_function
__all__ = ('Edge', 'Graph', 'Node')
import uuid
@SpotlightKid
SpotlightKid / PKGBUILD-python-airnef.sh
Last active Jan 28, 2019
Improved/fixed PKGBUILD for python-airnef AUR package
View PKGBUILD-python-airnef.sh
_name=airnef
pkgbase="python-${_name}"
pkgname=("python-${_name}" "python2-${_name}")
pkgver=1.1
pkgrel=1
pkgdesc="Wireless download from your Nikon/Sony/Canon camera"
arch=('any')
url="http://www.testcams.com/airnef/"
license=('GPL3')
depends=('tk')
@SpotlightKid
SpotlightKid / gh-get.py
Created Oct 19, 2018
Download a single file from a GitHub repository
View gh-get.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# gh-get.py
#
"""Download a single file from a GitHub repository."""
import shutil
from os.path import expanduser
@SpotlightKid
SpotlightKid / urlparse.py
Last active Sep 24, 2018
Reduced urllib.parse_qsl implementation for MicroPython
View urlparse.py
# -*- coding: utf-8 -*-
def parse_qsl(qs, keep_blank_values=False, strict_parsing=False,
encoding='utf-8', errors='replace'):
"""Parse a query given as a string argument.
Arguments:
qs: percent-encoded query string to be parsed. May be a unicode
string or a UTF-8 encoded byte-string.
@SpotlightKid
SpotlightKid / OPNplug.desktop
Created Sep 18, 2018
Improved PKGBUILD for adlplug-git AUR package
View OPNplug.desktop
[Desktop Entry]
Name=OPNplug
Name[fr]=OPNplug
Comment=FM Yamaha OPN2 synthesizer for ADLMIDI
Comment[fr]=Synthétiseur FM Yamaha OPN2 pour ADLMIDI
TryExec=OPNplug
Exec=OPNplug
Icon=OPNplug
Type=Application
Categories=AudioVideo;Audio;Music;Midi
@SpotlightKid
SpotlightKid / sendmail-smtp.py
Created Sep 12, 2018
Simple command line mailer
View sendmail-smtp.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Simple command line mailer.
Send text-only email via SMTP with message text read from stdin to all email addresses given as
arguments.
"""
import sys
@SpotlightKid
SpotlightKid / PKGBUILD-gimp-plugin-bimp.sh
Created Sep 7, 2018
Fixed PKGBUILD for AUR package gimp-plugin-bimp
View PKGBUILD-gimp-plugin-bimp.sh
# Contributor: Lex Black <autumn-wind at web dot de>
# Contributor: Lara Maia <lara@craft.net.br>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
_pkgname=bimp
pkgname=gimp-plugin-bimp
pkgver=1.18
pkgrel=1
pkgdesc='Batch Image Manipulation Plugin for GIMP.'
arch=('x86_64' 'i686')
@SpotlightKid
SpotlightKid / example_program_change_map.py
Last active Aug 30, 2018
Change program number of MIDI Program Change events according to given mapping
View example_program_change_map.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Example script which maps program change numbers."""
from miditk.smf import MidiFileReader, MidiFileWriter
class ProgramChangeMapper(MidiFileWriter):
"""Change program number of Program Change events according to given mapping."""
@SpotlightKid
SpotlightKid / file2h.py
Last active Aug 5, 2018
Convert a file to a C char array representation. Outputs a C header on standard output.
View file2h.py
#!/usr/bin/env python
"""Convert a file to a C char array representation.
Outputs a C header on standard output.
"""
from sys import argv, exit, stdout
from os.path import basename, isfile
@SpotlightKid
SpotlightKid / PKGBUILD
Last active Aug 2, 2018
Improved PKGBUILD for mu-editor AUR package
View PKGBUILD
# Maintainer: webmeister <aur -dot- 20 -dot- webmeister -at- spamgourmet -dot- com>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
pkgname=mu-editor
epoch=1
pkgver=1.0.0
pkgrel=1
pkgdesc='A simple Python editor for beginner programmers'
arch=('any')
url='https://codewith.mu/'
You can’t perform that action at this time.