Skip to content

Instantly share code, notes, and snippets.

View symm's full-sized avatar
🦆

Gareth Jones symm

🦆
View GitHub Profile
GIT_COMMITTER_DATE="`date`" git commit --amend --date "`date`"
@symm
symm / ee-data-usage.rb
Last active August 29, 2015 14:25
A little script for showing the remaining data allowance on EE data SIM
#!/usr/bin/env ruby
require 'mechanize'
require 'filecache'
cache = FileCache.new("data-usage", "/tmp", 60 * 30, 3)
unless cache.get('usage').nil?
puts cache.get('usage')
exit 0
@symm
symm / steam-lucasarts-support.diff
Created November 18, 2012 16:09
Steam LucasArts Adventures patch (from http://scummvm.bencastricum.nl/) ported to ScummVM v1.5.0
diff --git a/audio/audiostream.cpp b/audio/audiostream.cpp
index 1c5c435..32b38ef 100644
--- a/audio/audiostream.cpp
+++ b/audio/audiostream.cpp
@@ -33,6 +33,7 @@
#include "audio/decoders/quicktime.h"
#include "audio/decoders/raw.h"
#include "audio/decoders/vorbis.h"
+#include "audio/decoders/cdda.h"
@symm
symm / scram29c3.js
Created December 7, 2013 13:15
JavasScript text scrambler effect from the old 29c3 website
String.prototype.replaceAt=function(index, char ) { return this.substr(0, index) + char + this.substr(index+char.length); }
String.prototype.replace2At=function(index, char1, char2 ) { return this.substr(0, index) + char1 + char2 + this.substr(index+char1.length+char2.length); }
function scram29c3run() {
var elem = document.getElementById( 'header-29c3-scramble' );
if ( elem ) { var scram = new scram29c3( elem ); scram.run(); } else
{ setTimeout( scram29c3run, 500 ); }
elem = document.getElementById( 'header-29c3-scramble2' );
if ( elem ) { var scram = new scram29c3( elem ); scram.run(); }
}
@symm
symm / unix
Last active July 3, 2016 10:14 — forked from xero/unix
curl -L git.io.unix
,_ ,_==▄▂
, ▂▃▄▄▅▅▅▂▅¾. / /
▄▆<´ "»▓▓▓%\ / / / /
,▅7" ´>▓▓▓% / / > / >/%
▐¶▓ ,»▓▓¾´ /> %/%// / /
▓▃▅▅
diff --git a/utils/nfc-mfclassic.c b/utils/nfc-mfclassic.c
index 1242886..8d9c6f0 100644
--- a/utils/nfc-mfclassic.c
+++ b/utils/nfc-mfclassic.c
@@ -431,8 +431,8 @@ write_card(int write_block_zero)
}
} else {
// The first block 0x00 is read only, skip this
- if (uiBlock == 0 && ! write_block_zero && ! magic2)
- continue;
@symm
symm / Makefile
Created November 5, 2016 14:17
avrfid
# Hey Emacs, this is a -*- makefile -*-
# AVR-GCC Makefile template, derived from the WinAVR template (which
# is public domain), believed to be neutral to any flavor of "make"
# (GNU make, BSD make, SysV make)
MCU = attiny85
FORMAT = ihex
TARGET = avrfid
### Keybase proof
I hereby claim:
* I am symm on github.
* I am gaz (https://keybase.io/gaz) on keybase.
* I have a public key ASCLjhHAu4nSDCuNGpl4HQZGWKvYbJWHXlUj0jr8U1Imrgo
To claim this, I am signing this object:
[Unit]
Description=RTL-SDR Server
Wants=network-online.target
After=network-online.target
[Service]
ExecStartPre=/bin/sleep 15
ExecStart=/bin/sh -c '/usr/bin/rtl_tcp -a 0.0.0.0 -s 1024000'
from fractions import gcd
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
from Crypto.Hash import SHA
def egcd(a, b):
if a == 0:
return (b, 0, 1)