Skip to content

Instantly share code, notes, and snippets.

View GothAck's full-sized avatar
🙃
Reverse engineering is fun...

Greg "GothAck" Miell GothAck

🙃
Reverse engineering is fun...
View GitHub Profile
@GothAck
GothAck / openpgp.txt
Created December 24, 2018 18:21
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:5495705b4dced5d79efc4fbecbc22c241d831489]
<html>
<body>
<script>
const EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
easeOutQuad: function (t) { return t*(2-t) },

Keybase proof

I hereby claim:

  • I am GothAck on github.
  • I am gothack (https://keybase.io/gothack) on keybase.
  • I have a public key whose fingerprint is EEC6 90B8 7B6B 02FA 40EB 94CC 56D8 B481 B23F 523F

To claim this, I am signing this object:

@GothAck
GothAck / .zshrc
Last active January 1, 2016 08:09
Adding to the GIT Index with Sublimerge
function sli () {
if [ -z "$1" ] || [ "$1" = "-h" ]; then
echo "sli - Sublimerge add to GIT index"
echo "Usage:"
echo "sli [options] {path to file}"
echo
echo "Call this function in the root of the GIT working tree after using the custom Sublimerge comparison"
return 0
fi
GIT_FILE="$1"
@GothAck
GothAck / gist:6726943
Created September 27, 2013 10:55
Reclassify servers in Zenoss, keeping their title
for dev in dmd.Devices.Server.Linux.getSubDevices():
if 'MyNewClass' in [a for x in dev.path() for a in x]:
print 'Already moved %s: %s' % (dev.id, dev.title)
continue
title = dev.title
id = dev.id
dev.changeDeviceClass('/Server/Linux/MyNewClass')
sync()
dev = find(id)
dev.title = title
@GothAck
GothAck / index.js
Created February 19, 2013 11:22
Example of Polymorphism in Node.js / ECMAScript / JavaScript
var types = require('./types');
var assert = require('assert');
var a = new types.MyPtt(7, 8);
assert(a instanceof types.Base, 'Inherits from Base');
assert(a instanceof types.MyPtt, 'Inherits from MyPtt (it\'s constructor)');
assert(typeof a.one === 'function', 'Has MyPtt "one" function');
assert(a.type === 'MyPtt', 'Has correct type')
@GothAck
GothAck / index.js
Created March 20, 2012 18:33
Parsing BIG compressed XML data (OpenStreetMap) with Node.js
#!/usr/bin/env node
/*
* Parsing BIG compressed data with Node.js and SAX
* Probably some bugs, but worked fine for OpenStreetMap Great Britain bz2
* Greg Miell 2012
*/
// Simple string trim prototype extension
String.prototype.trim = function() {