Skip to content

Instantly share code, notes, and snippets.

Avatar
🙃
Reverse engineering is fun...

Greg "GothAck" Miell GothAck

🙃
Reverse engineering is fun...
View GitHub Profile
@GothAck
GothAck / openpgp.txt
Created Dec 24, 2018
OpenKeychain Linked Identity
View openpgp.txt
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]
View sunrise.html
<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) },
View keybase.md

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 Jan 1, 2016
Adding to the GIT Index with Sublimerge
View .zshrc
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 Sep 27, 2013
Reclassify servers in Zenoss, keeping their title
View gist:6726943
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 Feb 19, 2013
Example of Polymorphism in Node.js / ECMAScript / JavaScript
View index.js
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 Mar 20, 2012
Parsing BIG compressed XML data (OpenStreetMap) with Node.js
View index.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() {