Skip to content

Instantly share code, notes, and snippets.

View w4's full-sized avatar
☄️
😩

jordan w4

☄️
😩
View GitHub Profile
@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']
@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':

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 / 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:
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 / 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):
#!/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:"
From a5f4c545e231d76226497b938baf0b9d7747584b Mon Sep 17 00:00:00 2001
From: "jordan@doyle.la" <jordan@doyle.la>
Date: Fri, 7 Aug 2020 17:21:17 +0100
Subject: [PATCH] Use CSS styles for syntax highlighting
---
Cargo.lock | 6 +++---
Cargo.toml | 2 +-
src/highlight.rs | 26 +++++++++++++-------------
src/main.rs | 9 ++++++++-
@w4
w4 / Cargo.toml
Last active January 9, 2022 17:11
spotify playlist scraper (api-based)
[package]
name = "spotify-playlist-scraper"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rspotify = { version = "0.11.3", features = ["cli"] }
futures = "0.3.19"