Skip to content

Instantly share code, notes, and snippets.

View scy's full-sized avatar

Tim Weber scy

View GitHub Profile
@scy
scy / borg-restic-dedup.md
Created March 16, 2021 15:57
Borg and restic and their deduplication with inserted bytes
@scy
scy / speedlog.sh
Last active March 19, 2020 00:22
Log Speedtest.net results to IoTPlotter
#!/bin/sh
# Requires the (official) Speedtest CLI app available at ./speedtest
# Get it at <https://www.speedtest.net/apps/cli>
# Usage: speedlog.sh feed_id api_key
# Get the two arguments from your IoTPlotter.com feed.
# Currently, a single server (ID 1746) is hardcoded.
# I'll make this configurable soon™.
@scy
scy / packets.txt
Last active January 11, 2020 09:19
Checksum of a proprietary RS485 protocol
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
scy / SuperCollider on Termux.md
Last active December 13, 2021 10:45
My attempt to build SuperCollider on Termux/Android

This was supposed to be posted on the SC forums at scsynth.org, 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
scy / gw2-golang-poc.go
Last active September 20, 2022 15:08
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.
package main
import (
"fmt"
"log"
"syscall"
"time"
"unsafe"
"unicode/utf16"
"unicode/utf8"
@scy
scy / login-notify
Created December 7, 2017 22:07
Only allow SSH logins after a push notification to your phone has been sent
#!/bin/sh
# Only allow SSH logins after a push notification to your phone has been sent.
# Also sends a notification after logging out.
# This uses the Pushover service (pushover.net).
# If Pushover cannot be reached, the login will be denied!
# Add something like this to /etc/pam.d/sshd:
# session required pam_exec.so /usr/local/bin/login-notify
# For Debian, a good place is after "@include common-account".
@scy
scy / install-phantomjs.sh
Created May 21, 2014 14:10
Simple PhantomJS installer for Linux
#!/bin/sh
set -e
if [ "$(id -u)" -ne 0 ]; then
printf 'WARNING: You will most likely need to be root, but continuing anyway ...\n' >&2
fi
url="$1"
if [ -z "$url" ]; then
printf 'Please go to <http://phantomjs.org/download.html> and find the\n'
@scy
scy / utc.py
Created April 30, 2014 22:55
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
scy / keybase.md
Last active February 8, 2020 12:51
keybase.md

Keybase proof

I hereby claim:

  • I am scy on github.
  • I am scy (https://keybase.io/scy) on keybase.
  • I have a public key ASAdsSlXz8yCDiWmbQDYVCO2FiNRysGf4rIxRieOYynBIgo

To claim this, I am signing this object:

@scy
scy / btrsnap
Last active August 29, 2015 13:56
a btrfs-based local snapshotting script (for timemachine-like fuckup recovery)
Please see https://github.com/scy/scybtr/blob/master/btrsnap instead.