Skip to content

Instantly share code, notes, and snippets.

View JackDesBwa's full-sized avatar

JackDesBwa JackDesBwa

  • France
  • 06:54 (UTC +02:00)
View GitHub Profile
;;;
;;; COLOGRAM.SCM -*-scheme-*- This File is written by Friedemann Wolpert 2010
;;; You can contact the Author using the following eMail: Friedemann@MedienKunstOnline.De
;;; Project Entry for "Mach Flott den Schrott 2", Heise Magazin
;
; Found on MedienKunstOnline.De thanks to the Wayback Machine :
; https://web.archive.org/web/20150502123253/http://medienkunstonline.de:80/Cologram_Uk.scm
(define (script-fu-cologram image layer rows-per-sec dpi-setting img-resize want-sharpen want-grid want-adjframe frameforecolor framerearcolor adjframedist adjframewidth want-cutframe cutframedist cutframewidth
;anchor-top anchor-down anchor-left anchor-right format
@JackDesBwa
JackDesBwa / masquerade.sh
Last active May 31, 2016 18:40
Script to configure simple masquerade
#!/bin/sh
if [ _$1 == _ ]
then
echo "Usage: $0 <output_if>"
exit 1
fi
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o $1 -j MASQUERADE
@JackDesBwa
JackDesBwa / midi2c.py
Created March 13, 2016 14:10
Script to convert midi files into C structure exploitable by (e.g.) microcontrollers
#!/usr/bin/env python2
# This script uses mido <https://pypi.python.org/pypi/mido/1.1.3> to
# transform a midi file into a C structure to be played by a
# microcontroller firmware for example
from mido import MidiFile
import sys
if len(sys.argv) != 2: