Skip to content

Instantly share code, notes, and snippets.

View brentvollebregt's full-sized avatar

Brent Vollebregt brentvollebregt

View GitHub Profile
@brentvollebregt
brentvollebregt / the-rock-2000-results-2023.json
Last active September 8, 2023 06:58
The Rock (NZ radio station - therock.net.nz) 2000 countdown of the most voted songs for 2023
[
{
"rank": "1",
"title": "Master Of Puppets",
"album": "Master Of Puppets",
"artist": "Metallica",
"albumYear": "1986",
"rankOneYearAgo": "2",
"rankTwoYearsAgo": "14",
"timestamp": "2023-09-08 18:53:12",
@brentvollebregt
brentvollebregt / the-rock-2000-results-2022.json
Last active October 1, 2022 08:29
The Rock (NZ radio station - therock.net.nz) 2000 countdown of the most voted songs for 2022
[
{
"rank": "1",
"title": "Simple Man",
"album": "(Pronounced 'Lĕh-'nérd 'Skin-'nérd)",
"artist": "Lynyrd Skynyrd",
"albumYear": "1973",
"rankOneYearAgo": "3",
"rankTwoYearsAgo": "10",
"timestamp": "2022-09-30 19:00:00",
@brentvollebregt
brentvollebregt / the-rock-2000-results-2021.json
Last active October 1, 2022 08:29
The Rock (NZ radio station - therock.net.nz) 2000 countdown of the most voted songs for 2021
[
{
"rank": "1",
"title": "Killing In The Name",
"album": "Rage Against The Machine",
"artist": "Rage Against The Machine",
"albumYear": "1992",
"rankOneYearAgo": "7",
"rankTwoYearsAgo": "3",
"timestamp": "2021-09-24 18:58:00",
"""
Google Photos Takeout Processor
This tool takes an unzipped and merged (for takeouts above 10Gb) Google Photos Takeout and filters duplicates, applies
metadata and moves all files to an output folder with each file having the format
`YYYY-MM-DD_HH-MM-SS {original_filename}`.
Setup:
1. Install tqdm: `pip install tqdm`
2. Install loguru: `pip install loguru`
@brentvollebregt
brentvollebregt / the-rock-2000-results-2020.json
Last active April 26, 2021 04:34
The Rock (NZ radio station - therock.net.nz) 2000 countdown of the most voted songs for 2020
[
{
"rank": "1",
"title": "Everlong",
"album": "The Colour and the Shape",
"artist": "Foo Fighters",
"albumYear": "1997",
"rankOneYearAgo": "8",
"rankTwoYearsAgo": "6",
"timestamp": "2020-11-06 18:51:00",
@brentvollebregt
brentvollebregt / the-rock-1500-results-2019.json
Created September 13, 2019 10:38
The Rock (NZ radio station - therock.net.nz) 1500 countdown of the most voted songs for 2019
[
{
"rank": "1",
"title": "Black",
"album": "Ten",
"artist": "Pearl Jam",
"albumYear": "1991",
"rankOneYearAgo": "2",
"rankTwoYearsAgo": "3",
"timestamp": "2019-09-13 18:57:13",
@brentvollebregt
brentvollebregt / hotkeyDetector.py
Last active April 1, 2020 21:56
Detect when keys are pressed to simulate a hotkey detection script
# from https://github.com/moses-palmer/pynput/issues/20
from pynput import keyboard
# The key combination to check
COMBINATIONS = [
{keyboard.Key.shift_r, keyboard.KeyCode(char='a')},
{keyboard.Key.shift_r, keyboard.KeyCode(char='A')}
]
# The currently active modifiers
@brentvollebregt
brentvollebregt / setModificationTime.py
Created November 5, 2017 06:51
Change/Set Modification and Last Access Time With Python
import os
import time
import datetime
fileLocation = r""
year = 2017
month = 11
day = 5
hour = 19
minute = 50
@brentvollebregt
brentvollebregt / sort_mp3_and_m4a.py
Created June 10, 2017 13:39
Sorts a directory of mp3 and m4a files to folders by their tags
# Will sort a given direcotry of music (copy)
# Requires mutagen
import os
from mutagen.id3 import ID3
from mutagen.easymp4 import EasyMP4
import shutil
input_folder = input("What is the folder to get files from?")
output_folder = os.getcwd() + "/Output/"
@brentvollebregt
brentvollebregt / get_wifi_passwords.py
Last active October 11, 2023 08:32
Will find each network profile on a Windows machine and print the profile and password
import subprocess
a = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8', errors="ignore").split('\n')
a = [i.split(":")[1][1:-1] for i in a if "All User Profile" in i]
for i in a:
try:
results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8', errors="ignore").split('\n')
results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
try:
print ("{:<30}| {:<}".format(i, results[0]))