Skip to content

Instantly share code, notes, and snippets.

View stuartpb's full-sized avatar

Stuart P. Bentley stuartpb

View GitHub Profile
#include <stdio.h>
int main(void) {
int i, x, y, e, o;
for (i=0; i < 64; i++){
//d2xy(8,i,&x,&y);
e =((i & 0x20) >> 3)
|((i & 0x08) >> 2)
|((i & 0x02) >> 1);
o =((i & 0x10) >> 2)
[root@sandbox ~]# xxd wtf/script.jade
0000000: ed41 0000 0010 0000 79e2 e053 79e2 e053 .A......y..Sy..S
0000010: 0d7e da53 0000 0000 0000 0300 0800 0000 .~.S............
0000020: 0000 0800 0700 0000 0af3 0100 0400 0000 ................
0000030: 0000 0000 0000 0000 0100 0000 bf22 1000 ............."..
0000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000060: 0000 0000 f2c0 7735 0000 0000 0000 0000 ......w5........
0000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000080: 1c00 0000 bc90 bd9f 0000 0000 68f5 b3e1 ............h...

Keybase proof

I hereby claim:

  • I am stuartpb on github.
  • I am stuartpb (https://keybase.io/stuartpb) on keybase.
  • I have a public key whose fingerprint is C8C7 AD2C 91B1 545A 72F0 B3EF D957 B96C EE60 B088

To claim this, I am signing this object:

@stuartpb
stuartpb / gethome.sh
Created June 18, 2014 23:10
Get the base for home directories used by useradd
unset HOME
[ -e /etc/default/useradd ] && source /etc/default/useradd
${HOME:=/home}
@stuartpb
stuartpb / maphack.js
Last active August 29, 2015 14:02
Script for ganking TF2 map images from Wikipedia
// phase 0: copy a subsection of the source of http://wiki.teamfortress.com/wiki/Template:List_of_maps, trim whitespace and run:
// s/\|-\n\|\s*\[\[File:([^\|]*)\|[^\n]*\n\|[^\|]*\|([^\]]*)\]\]'*\n[^\n]*\n\| \{\{code\|([^\}]*)\}\}\n[^\n]*\n[^\n]*\n[^\n]*\n/{id: "$3", name: "$2", image: "$1"},\n/g
//phase 1
var maps = [
{id: "ctf_2fort", name: "2Fort", image: "Ctf 2fort bridge ss.png"},
{id: "ctf_doublecross", name: "Double Cross", image: "CTF DoubleCross RedBase.png"},
{id: "ctf_sawmill", name: "Sawmill", image: "CTF Sawmill Center.png"},
@stuartpb
stuartpb / dump.js
Created April 10, 2014 22:23
Script for dumping / re-constructing multiple domain transfer list on NameSilo
// for https://www.namesilo.com/transfer_results.php
[].slice.call(document.querySelectorAll('input[name$="_transfer_auth_code"]'))
.map(function (el) {
return el.name.slice(0,-"_transfer_auth_code".length).replace(/_/g,'.')
+ ', ' + el.value})
.join('\n');
@stuartpb
stuartpb / demo.html
Last active February 10, 2018 14:23 — forked from kig/gzip.js
<!DOCTYPE html>
<html>
<head>
<script src="gzip.js"></script>
<script>
function showImg(f) {
var res = document.getElementById('results');
var e = document.createElement('div');
res.appendChild(e);
var p = document.createElement('p');
@stuartpb
stuartpb / interval-queue.js
Created January 26, 2014 09:40
Simple JS function for performing functions in a timed queue.
function iq(ms, f, q) {
q = q || [];
var timer = null;
function drain() {
var p = q.shift();
if (p) {
f ? f(p) : p();
} else {
clearInterval(timer);
timer = null;
@stuartpb
stuartpb / proposal.md
Last active January 3, 2016 20:29
A proposal for a Generalized Hashcash Format

Generalized Hashcash Header

History

Proposal goals

  • Enable some degree of modularity and interoperability for hashcash library components.
  • Specify hashcash patterns for domains beyond email.
  • Allow individual components, such as the hashing function, to change without breaking orthogonal components, such as calculation and valuation.