Skip to content

Instantly share code, notes, and snippets.

@heyjoeway
heyjoeway / sshrdp.ps1
Created May 1, 2019 16:49
RDP over SSH (Powershell)
param(
[string]$rdpSourcePort="3389",
[string]$rdpDestPort="20000",
[string]$sshPort="22",
[string]$sshUri=""
)
$sshProcess = Start-Process "ssh" -ArgumentList "-fNTC -L 127.0.0.1:${rdpDestPort}:127.0.0.1:${rdpSourcePort} $sshUri -p $sshPort" -PassThru
Start-Process "mstsc" -ArgumentList "/v:127.0.0.1:${rdpDestPort}" -Wait
Stop-Process -Id $sshProcess.Id -Force
Using Frozlunky, you can screw with enemy AIs to give them other behaviours. A lot of options aren't labeled, so here's what I found after experimenting with them:
132 - Tiny and pulsating; otherwise normal?
1fe - Animations and event timers break
3ec - Enemies charge and grunt at you on sight
3f1 - Enemies grunt on sight
3f3 - Hawk-head jumping
3fc - Vampire
416 - Some enemies vibrate for a few seconds, then die when you get near them. General broken-ness
429 - Enemies rapidly move back and forth
@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
}
@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 / 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 / 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 / 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 / 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 / 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 / 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: