Skip to content

Instantly share code, notes, and snippets.

@PMaynard
PMaynard / sources.list
Last active December 12, 2015 02:58
Fancy Debian sources.list
deb http://ftp.uk.debian.org/debian stable main contrib non-free
deb-src http://ftp.uk.debian.org/debian stable main contrib non-free
deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free
#Third Parties Repos
@PMaynard
PMaynard / proxyfuzz.py
Last active October 18, 2023 08:57
Proxy Fuzz
# Proxyfuzz: a TCP and UDP proxy man-in-the-middle fuzzer
# v 0.1
# By Rodrigo Marcos
# http://www.theartoffuzzing.com
from twisted.protocols import portforward
from twisted.internet.protocol import DatagramProtocol
from twisted.internet import reactor
import getopt, sys
from random import randint
@PMaynard
PMaynard / move.sh
Created April 5, 2014 18:31
Move all .js files into their own directory and create a README.md
#!/bin/sh
for filename in *.js
do
D=$(basename $filename .js)
mkdir $D
git mv $filename $D
echo "# $D" > $D/README.md
done;
@PMaynard
PMaynard / isBus.js
Last active August 29, 2015 13:58
Next Bus Please
/* bus-times.json
{
"fromScience": [
{ "hr": 12, "min": 30 },
{ "hr": 16, "min": 0 },
{ "hr": 16, "min": 30 },
{ "hr": 17, "min": 0 },
{ "hr": 17, "min": 45 },
{ "hr": 19, "min": 0 }
]
@PMaynard
PMaynard / convert.sh
Created May 5, 2014 23:10
Dot to SVG-Tex
D=$(basename $1 .dot)
dot -Tsvg $1 -o $D.svg
inkscape -D -z --file=$D.svg --export-pdf=../$D.pdf --export-latex
echo "EOF"
@PMaynard
PMaynard / stats_64.sh
Created May 22, 2014 10:36
vnstati Data URI
echo "<img src=\"data:image/png;base64,$(vnstati -d -o - | base64)\"/>" > derp.html
/* {"quote": "\"In theory, there is no difference between theory and practice. But, in practice, there is.\"", "author": "Jan L. A. van de Snepscheut"} */
$.get('<URL-TO-Quote>', function (data) {
$('#quote').text(data.quote);
$('#quote-author').text(data.author);
})
@PMaynard
PMaynard / MD2PDF-Pandoc.sublime-build
Created June 6, 2014 16:29
Sublime Text build script - Markdown to PDF using pandoc
{
"shell_cmd": "pandoc -r markdown -o $file_base_name.pdf $file"
}
@PMaynard
PMaynard / clock.py
Created June 26, 2014 11:08
Simple Clock
import pygame
from pygame.locals import *
import sys
from time import gmtime, strftime
pygame.init()
font = pygame.font.Font(None, 30)
screen = pygame.display.set_mode(font.size("XX:XX:XX"))
background = pygame.Surface(screen.get_size() )
### Keybase proof
I hereby claim:
* I am pmaynard on github.
* I am osaka (https://keybase.io/osaka) on keybase.
* I have a public key whose fingerprint is FEF1 FD3D CD50 3E2D E02B EDA2 248F C016 ABB8 D69D
To claim this, I am signing this object: