Skip to content

Instantly share code, notes, and snippets.

View stuaxo's full-sized avatar
💭
 

Stuart Axon stuaxo

💭
 
View GitHub Profile
@stuaxo
stuaxo / extract_images.sh
Created August 18, 2015 14:21
Extract MSDOS disk images to a directory.
#!/bin/bash
function extract_images() {
# Disk images have a string like this
#
# DISK-1.IMA: , MS or PC-DOS bootloader IO.SYS+MSDOS.SYS
#
#
dest=$1
file *.IMA | grep 'PC-DOS' | awk -F '[/:]' '{print $1}' |
@stuaxo
stuaxo / webgl_sample5-pyopengl-port.py
Last active August 29, 2015 17:31
Port of mozilla sample5 to pyopengl.py
"""
Well ... this isn't the nicest port, I tried a second time with all the comments, but it didn't seem to work
- the 2nd version is here https://gist.github.com/stuaxo/5c641637f65a53cc8020
Instead of webgl uses pyopengl
Instead of glm uses pyrr
Install Dependencies
pip install numpy pyopengl pyrr
@stuaxo
stuaxo / webgl_sample5-pyopengl-port-notworking.py
Created August 29, 2015 17:31
Port of mozilla webgl sample5 to pyopengl - not working
"""
This is a port of the mozilla webgl-sample5 to pyopengl
I made this from scratch to more closely follow the original and includes all the comments... except it
just has a black screen :/
The working, but more dirty version is here:
https://gist.github.com/stuaxo/ed0b5bd691f766098faf
Instead of webgl uses pyopengl
@stuaxo
stuaxo / asio-sdk-installed.sh
Created August 31, 2015 18:30
Download and install steinberg ASIO SDK.
#!/bin/bash
## Heavily based on the android-sdk installed at https://gist.github.com/tahl/1026610
# Uses dtrx to extract the archive with a sane name
# Creates a symlink in /usr/local/asio-sdk to the version installed
i=$(cat /proc/$PPID/cmdline)
if [[ $UID != 0 ]]; then
@stuaxo
stuaxo / kivy_resize_window_right.log
Created September 9, 2015 08:12
Resizing windows is pretty borked
$ python test_resize.py
[INFO ] [Logger ] Record log in /home/stu/.kivy/logs/kivy_15-09-09_19.txt
INFO:kivy:[Logger ] Record log in /home/stu/.kivy/logs/kivy_15-09-09_19.txt
[INFO ] [Kivy ] v1.9.1-dev
INFO:kivy:[Kivy ] v1.9.1-dev
[INFO ] [Python ] v2.7.9 (default, Apr 2 2015, 15:33:21)
[GCC 4.9.2]
INFO:kivy:[Python ] v2.7.9 (default, Apr 2 2015, 15:33:21)
[GCC 4.9.2]
[INFO ] [Factory ] 177 symbols loaded
@stuaxo
stuaxo / apc_mini.py
Created September 10, 2015 12:16
APC mini test
#!/bin/python
# -*- coding: utf-8 -*-
"""
get input from a real APC mini and display it on.
usage
-----
$ python apc_mini.py "APC MINI MIDI 1"
@stuaxo
stuaxo / stdebize_pubsub.sh
Last active December 25, 2015 23:46
generate pubsub debs
#!/bin/bash
mkdir stdeb-pubsub
pushd stdeb-pubsub
virtualenv env
git clone https://github.com/nehz/pubsub
pushd pubsub
../env/bin/pip install stdeb
@stuaxo
stuaxo / rerun.py
Last active August 26, 2022 01:18
Re run a process if HUP is recieved.
#!/usr/bin/env python
"""
rerun - kill and rerun subprocess on recieving HUP signal.
$ rerun myproc
In another terminal restart using
$ kill rerun:myproc -HUP
PGI coverage of AccountsService
gi.repository.AccountsService AccountsService
User OK
UserAccountType OK
UserClass OK
UserManager OK
UserManagerClass OK
UserManagerError OK
UserManagerPrivate OK
UserPasswordMode OK
@stuaxo
stuaxo / debuild cairo.txt
Last active February 21, 2016 21:27
cairo with gl - debuild -uc -us output (Click "view full file below to see all of it)
$ debuild -uc -us
dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: source package cairo
dpkg-buildpackage: source version 1.14.2-2ubuntu2
dpkg-buildpackage: source distribution wily
dpkg-buildpackage: source changed by Robert Ancell <[email protected]>
dpkg-source --before-build cairo-1.14.2
dpkg-buildpackage: host architecture amd64
fakeroot debian/rules clean
dh clean --with autoreconf