Skip to content

Instantly share code, notes, and snippets.

View w4's full-sized avatar
☄️
😩

jordan w4

☄️
😩
View GitHub Profile
#!/usr/bin/env bash
CURR_DIR="$(pwd)"
for dir in /share/git/pub/*; do
cd "$dir"
RET=$(git remote get-url github+w4 > /dev/null; echo $?)
if [[ $RET -ne 0 ]]; then
echo "not in git: $dir"
continue
fi
echo "$dir:"
@w4
w4 / koselig.diff
Created May 5, 2018 19:02
koselig diff
diff --git a/.env.example b/.env.example
index ec44a125..dbc3c70a 100644
--- a/.env.example
+++ b/.env.example
@@ -7,14 +7,16 @@ APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
@w4
w4 / build_hosts.py
Last active January 22, 2020 15:28
Build a host file from a dhcp.leases file
# This is a simple little script for parsing dhcpd.leases files and
# returning a hosts file for them.
# on DNS server: */5 * * * * curl http://10.0.0.1:4400/ -o /etc/dhcp_hosts
from http.server import BaseHTTPRequestHandler, HTTPServer
import re
from ipaddress import ip_network, ip_address
class S(BaseHTTPRequestHandler):
from functools import reduce
import operator
grid = [
[8, 49, 81, 52, 22, 24, 32, 67, 24, 21, 78, 16, 86, 19, 4, 88, 4, 20, 20, 1],
[2, 49, 49, 70, 31, 47, 98, 26, 55, 36, 17, 39, 56, 80, 52, 36, 42, 69, 73, 70],
[22, 99, 31, 95, 16, 32, 81, 20, 58, 23, 53, 5, 0, 81, 8, 68, 16, 36, 35, 54],
[97, 40, 73, 23, 71, 60, 28, 68, 5, 9, 28, 42, 48, 68, 83, 87, 73, 41, 29, 71],
[38, 17, 55, 4, 51, 99, 64, 2, 66, 75, 22, 96, 35, 5, 97, 57, 38, 72, 78, 83],
[15, 81, 79, 60, 67, 3, 23, 62, 73, 0, 75, 35, 71, 94, 35, 62, 25, 30, 31, 51],
@w4
w4 / twitter-scanner.py
Last active August 18, 2016 17:38
Advanced Twitter handle scanner, scans a list of names and checks if it is available. Requires Tor.
"""Twitter handle scanner
Scans a specified list for available twitter handles. When blocked by Twitter, the script
will automatically request another exitpoint from Tor and continue running until it runs
out of names.
Syntax:
python3 twitter-scanner.py -h
Requires:

Keybase proof

I hereby claim:

  • I am w4 on github.
  • I am jrd (https://keybase.io/jrd) on keybase.
  • I have a public key ASBqMxqOu8CyUkXTPfH7kJHXO8_b-CtB3VfcLsfMYePOFgo

To claim this, I am signing this object:

@w4
w4 / password.py
Last active December 9, 2015 21:02
Super secure random password generator. Inspired by https://xkcd.com/936/
from random import SystemRandom
from itertools import permutations
from math import factorial
from sys import argv
sysRandom = SystemRandom()
lines = open('/usr/share/dict/words').read().split('\n')
if len(argv) > 1 and argv[1] == 'count':
@w4
w4 / github_scanner.py
Last active December 1, 2015 16:24
Scan through combinations of github names and check the availability of said names
from itertools import product
from sys import argv
from random import shuffle
from urllib.request import urlopen
from urllib.error import HTTPError
def main(args):
letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u',
'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']