Skip to content

Instantly share code, notes, and snippets.

View Supermathie's full-sized avatar
🏠
Working from home, before it was cool

Michael Brown Supermathie

🏠
Working from home, before it was cool
View GitHub Profile
@Supermathie
Supermathie / client config
Last active August 29, 2015 13:57
salt master config
ipc_mode: tcp
master: orchestrator.netdirect.ca
root_dir: c:\salt
pki_dir: /conf/pki/minion
id: win7-salt
multiprocessing: False
@Supermathie
Supermathie / parseCSV.py
Created April 14, 2014 20:50
python CSV example
#!/usr/bin/env python
import csv
import sys
from pprint import pprint
csvreader = csv.reader(sys.stdin)
# Read the header line and extract the column names
header = csvreader.next()
#!/usr/bin/env python2
"""
Author: takeshix <[email protected]>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@Supermathie
Supermathie / mk_new_swap
Created April 22, 2014 04:09
add a 512MB swapfile
#!/bin/bash -e
# This script adds a 512MB swapfile to the system
function get_new_swapfile() {
for i in `seq 0 99`; do
if [ ! -e /swapfile.$i ]; then
echo /swapfile.$i
return
fi
@Supermathie
Supermathie / gist:11258633
Created April 24, 2014 15:22
OpenDNS FTL
○ → host -a updates.mailfoundry.net 208.67.220.222
updates.mailfoundry.net. 1245 IN A 66.18.18.59
○ → host -a updates.mailfoundry.net 208.67.220.220
updates.mailfoundry.net. 402 IN A 66.18.18.59
updates.mailfoundry.net. 0 IN AAAA ::ffff:67.215.65.132
@Supermathie
Supermathie / keybase.md
Created September 22, 2014 20:17
keybase.md

Keybase proof

I hereby claim:

  • I am supermathie on github.
  • I am supermathie (https://keybase.io/supermathie) on keybase.
  • I have a public key whose fingerprint is B753 BD6B 2F90 7540 0F48 0008 6C07 FB30 07CF 9360

To claim this, I am signing this object:

@@ -1,48 +1,49 @@
-ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(128) Mac=AEAD
-ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(128) Mac=AEAD
ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(256) Mac=AEAD
-DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(128) Mac=AEAD
-DHE-DSS-AES128-GCM-SHA256 TLSv1.2 Kx=DH Au=DSS Enc=AESGCM(128) Mac=AEAD
-DHE-DSS-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=DSS Enc=AESGCM(256) Mac=AEAD
-DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(256) Mac=AEAD
-ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AES(128) Mac=SHA256
@Supermathie
Supermathie / 50fix
Created February 7, 2017 16:32
fix apt
# /etc/apt/apt.conf.d/50fix_apt
APT {
Install-Recommends "false";
Install-Suggests "false"; AutoRemove {
SuggestsImportant "false"; RecommendsImportant "false";
}
}
var pattern = /(MOBI|EPUB|PDF|CBZ|PDF \(HQ\))$/i;
var out = "";
var nodes = document.getElementsByTagName('a');
for (i in nodes) {
var a = nodes[i];
if (a && a.text && pattern.test(a.text.trim())) {
out += a.attributes['data-web'].value;
out += "\n";
}
}
@Supermathie
Supermathie / gist:1fe384a61280abbdf3ced26fac695675
Created June 1, 2017 16:04
ISC DHCP PXE architecture switching example
option arch code 93 = unsigned integer 16;
if substring(option vendor-class-identifier, 0, 9) = "PXEClient" {
if option arch = 00:02 { # IA64 EFI boot
filename "/NoopApp.efi"; # not the right image, but we don't care
} else if option arch = 00:06 { # x86 EFI boot
filename "/NoopApp.efi"; # not the right image, but we don't care
} else if option arch = 00:07 { # BC (bytecode) EFI boot
filename "/live-efi/elilo.efi";
} else if option arch = 00:09 { # x64 EFI boot
filename "/live-efi/elilo.efi";