Skip to content

Instantly share code, notes, and snippets.

View JonnoFTW's full-sized avatar
⚔️
Fighting off bugs with a sword 🤺

Jonathan Mackenzie JonnoFTW

⚔️
Fighting off bugs with a sword 🤺
View GitHub Profile
@JonnoFTW
JonnoFTW / config.py
Last active February 4, 2018 12:22 — forked from SmashT/config.py
Reddit Dev Flair Bot
# Subreddit to check
subreddit = 'subreddit'
# Mod flair name
mod_flair = 'Developer'
# Credentials, subreddit management required
user_agent = 'UserAgent'
client_id = 'ClientID'
client_secret = 'ClientSecret'
username = 'Username'
@JonnoFTW
JonnoFTW / connectHTMLelements_SVG.png
Created February 25, 2019 05:07 — forked from alojzije/connectHTMLelements_SVG.png
Connect two elements / draw a path between two elements with SVG path (using jQuery)
connectHTMLelements_SVG.png
@JonnoFTW
JonnoFTW / large-file-hash.py
Last active August 23, 2023 07:01 — forked from aunyks/large-file-hash.py
Hash a large file in Python
import hashlib as hash
# Specify how many bytes of the file you want to open at a time
BLOCKSIZE = 1024 * 1024 * 8 # 8mb
def hash_file(fname: str):
sha = sha256()
with open(fname, 'rb') as fh:
while buff := fh.read(BLOCKSIZE):
sha.update(buff)