Skip to content

Instantly share code, notes, and snippets.


Tim Weber scy

View GitHub Profile
scy / btrsnap
Last active Aug 29, 2015
a btrfs-based local snapshotting script (for timemachine-like fuckup recovery)
View btrsnap
Please see instead.
scy /
Created Apr 30, 2014
How to parse a string as UTC in Python
import datetime
class UTC(datetime.tzinfo):
ZERO = datetime.timedelta(0)
def utcoffset(self, dt):
return self.ZERO
def tzname(self, dt):
return 'UTC'
def dst(self, dt):
return self.ZERO
scy / gist:944031
Created Apr 27, 2011
Automatically close tabs with Linus Neumann posts
View gist:944031
" Add this to your .pentadactylrc:
autocmd -js DOMLoad if (doc.querySelectorAll('body.single-post .entry-meta a[href=""]').length) { content.window.close(); }
scy / _edit.html.erb
Created Sep 11, 2011
Initializing a jQuery UI autocomplete with data from a Rails array
View _edit.html.erb
<script type="text/javascript">
// Trying to help @gedankenstuecke here. A bit hard because I don’t speak Rails (neither Ruby) and can’t try live what the output looks like.
$(function () {
source: <%=Phenotype.find_by_id(p.object.phenotype_id).known_phenotypes.to_json%>
scy /
Last active Dec 21, 2015
A simple :data(key) selector for jQuery
// jQuery UI has a :data selector. I wanted to have it without including jQuery UI.
// To find out how all of this works, read the Sizzle documentation:
// Thanks to @_Tomalak for inspiring me to check this out. = jQuery.expr.createPseudo(function (key) {
return function (el) {
return !!, key);
scy /
Created Sep 12, 2012
Un-expand $Id$ in a git-svn repository, with some special powers
# The problem:
# You have a clean git-svn working copy and, for example, rsync the files from
# the production server into it in order to find out whether some files have
# been changed directly on the server, without committing.
# However, the files on the production server possibly have $Id$ expanded, and
# now you're seeing a _lot_ of changed files which contain no differences except
scy / gw2-golang-poc.go
Last active Jan 2, 2019
Example on how to access the Guild Wars 2 Mumble Link API on Windows using Go. Not supposed to be good Go code, but it works.
View gw2-golang-poc.go
package main
import (
scy / SuperCollider on
Last active Sep 26, 2019
My attempt to build SuperCollider on Termux/Android
View SuperCollider on

This was supposed to be posted on the SC forums at, but I ran into the spam filter and thus saved it as a Gist first. It's on the forums now: My attempt to build SuperCollider on Termux/Android

I've been thinking about using SuperCollider on my phone. There's glastonbridge/SuperCollider-Android which hasn't been touched since 2014, so I thought I'll try to build a current version from source, based on the guide for Linux. Also, since Termux provides a great Linux CLI environment, including build toolchains, directly on the device, I wanted to try building SC under Termux.

Spoiler alert: I didn't manage to do it. The main problem is not having an audio driver, since the Linux build requires libjack, and neither Android nor Termux provide it. (Termux has

scy / packets.txt
Last active Jan 11, 2020
Checksum of a proprietary RS485 protocol
View packets.txt
Packets with “?” may have a wrong checksum, I’m not sure about those.
Format of a packet seems to be:
1 start byte
3 bytes header (I don’t understand it yet)
1 byte payload length
n bytes payload
1 byte checksum
Interested in what else I found out? Check the project page:
scy /
Created May 21, 2014
Simple PhantomJS installer for Linux
set -e
if [ "$(id -u)" -ne 0 ]; then
printf 'WARNING: You will most likely need to be root, but continuing anyway ...\n' >&2
if [ -z "$url" ]; then
printf 'Please go to <> and find the\n'
You can’t perform that action at this time.