Skip to content

Instantly share code, notes, and snippets.

# Automates KB5028997
# https://support.microsoft.com/en-us/topic/kb5028997-instructions-to-manually-resize-your-partition-to-install-the-winre-update-400faa27-9343-461c-ada9-24c8229763bf
# WARNING: THIS SCRIPT WILL CHANGE YOUR PARTITION LAYOUT. USE AT YOUR OWN RISK.
# NOT RESPONSIBLE FOR ANY DATA LOSS.
function KB5028997 {
$TargetSize = 750MB
$ReagentC = reagentc /info
@heyjoeway
heyjoeway / PrivacyScriptSplit.py
Created December 28, 2023 20:57
For https://privacy.sexy/: Split privacy-script.bat into individual batch scripts
# https://stackoverflow.com/a/7406369
def make_filename_safe(filename):
keepcharacters = (' ','.','_')
return "".join(c for c in filename if c.isalnum() or c in keepcharacters).rstrip()
def split_privacy_script(path):
def new_item():
return {
"title": "",
"contents": ""
@heyjoeway
heyjoeway / FreeZoteroOverleaf.md
Last active November 23, 2022 06:33
Free Zotero "integration" in Overleaf

Get a list of collections using:

https://api.zotero.org/users/[USER ID]/collections?key=[API KEY]

Where:

Find the "key" attribute corresponding to the collection you want to use. This is your [COLLECTION ID]. Then, in Overleaf, create a new file. Select "From External URL", then insert the following URL:

@heyjoeway
heyjoeway / FuckSoundCloud.py
Last active April 12, 2024 17:50
Get public SoundCloud client ID
# Fuck you soundcloud! :)
import urllib.request
from pyquery import PyQuery as pq
def getUrl(url):
with urllib.request.urlopen(url) as f:
return f.read().decode('utf-8')
def getSoundCloudClientID():
@heyjoeway
heyjoeway / recoverjpg.py
Created December 26, 2021 02:13
Recover JPG images from a raw disk image
path = r'C:\Users\Joseph\Desktop\image.img'
HEADER_START = [b'\xff', b'\xd8', b'\xff', b'\xe1']
# HEADER_END = [b'\xff', b'\xd9']
header_start_index = 0
outfile_index = 0
outfile = None
with open(path, 'rb') as f:
@heyjoeway
heyjoeway / Invoke-GUICommand-Example.ps1
Created October 28, 2021 15:29
Remotely run commands in a GUI PowerShell window
$ComputerName = "PC001", "PC002", "PC003" # ...
Invoke-GUICommand.ps1 -ComputerName $ComputerName -ScriptBlock {
echo "Hello World!"
pause
}
@heyjoeway
heyjoeway / scrapetopchannelsSB.js
Last active October 16, 2019 05:01
SocialBlade Top Channels Scraper
// Paste this code into the developer console while on this page:
// https://socialblade.com/youtube/top/5000/mostsubscribed
// In Chrome, open the Request Blocking tool, Enable Request Blocking, and add the following URL:
// ring.socialblade.com/ding.json
// SocialBlade seems to auto-refresh, so lets kill all timeouts to try and prevent that.
let id = window.setTimeout(function() {}, 0);
while (id--) {
@heyjoeway
heyjoeway / gunlockedtm.user.js
Last active October 11, 2020 21:14
Google Unlocked Tampermonkey
// ==UserScript==
// @name Google Unlocked Tampermonkey
// @namespace http://tampermonkey.net/
// @version 0.1
// @include *://www.google.com/*
// @include *://www.google.ad/*
// @include *://www.google.ae/*
// @include *://www.google.com.af/*
// @include *://www.google.com.ag/*
// @include *://www.google.com.ai/*
@heyjoeway
heyjoeway / sonicvector.md
Last active September 4, 2019 14:57
Vector-ifying Collision from S1-S3K

Vector-ifying Collision from S1-S3K

Note

THIS IS NOT A WALKTHROUGH. You will need prior experience with everything listed here for things to go smoothly. If someone wants to step-by-step-ify this, be my guest. Also, this process could probably apply to other games/stuff as well.

Requirements

  • GIMP
  • Blender
  • Inkscape
@heyjoeway
heyjoeway / PaletteCycle.shader
Last active April 19, 2023 02:18
Palette Cycle Shader (Unity)
Shader "Custom/PaletteCycle"
{
Properties
{
_MainTex ("Main Texture", 2D) = "white" {}
colorMap ("Color Map", 2D) = "white" {}
_CycleSpeed ("Cycle Speed", Float) = 200
[Toggle]
_Lerp ("Linear Interpolation", Float) = 0
}