Skip to content

Instantly share code, notes, and snippets.

View foone's full-sized avatar

Foone Turing foone

View GitHub Profile
@foone
foone / settings.json
Created April 30, 2020 06:33
new-tab settings for Windows Terminal
{
"keybindings": [{
"command": "closeTab",
"keys": [
"ctrl+w"
]
},
{
"command": "newTab",
"keys": [
@foone
foone / decode.py
Created May 6, 2020 07:48
Password Decoding for REDACTED game
import struct, sys
ALPHABET='AM2L3C4Z5P6B7HE9'
if len(sys.argv)>1:
code = sys.argv[1]
else:
code = '53999-999EA-7279B'
# uppercase and remove dashges
code = code.upper().replace('-','')
@foone
foone / usb microscope.txt
Created June 7, 2020 00:02
USB info of the Plugable USB 2.0 Digital Microscope
Bus 001 Device 014: ID 1e4e:0109 Cubeternet
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
@foone
foone / get-local-key.sh
Created June 18, 2020 21:11
Get a key from a GPG keyserver and save it locally
mkdir temp-keyring
gpg --homedir temp-keyring --no-default-keyring --verbose --keyserver pool.sks-keyservers.net --output foobar.txt --recv-keys A278B781FE4B2BDA
gpg --homedir temp-keyring --output A278B781FE4B2BDA.gpg --armor --export
rm -rf temp-keyring/
@foone
foone / vtech USB tote & go laptop.txt
Created July 3, 2020 06:12
USB info for the VTech Tote & Go Web Laptop
Bus 001 Device 017: ID 0f88:2f13 VTech Holdings, Ltd
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
@foone
foone / gist:9b1ed60415afb2197315949ed1f888bc
Created July 19, 2020 01:59
Block twitter's trending sidebar
twitter.com##div[aria-label="Timeline: Trending now"]
@foone
foone / kiddyscancodes.txt
Last active September 10, 2020 02:04
Kiddie Keyboard scancodes
127 (nothing)
255 down
95 up
223 down up
119 right
63 down right
87 up right
215 down up right
63 left
191 down left
@foone
foone / rptimage.py
Created September 19, 2020 04:11
RPT decoder for Super Mario 64 RPT textures from Super Mario 3D All-Stars
# To use:
# 1. extract the NCAs from the NSP (I used NSCB)
# 2. extract the contents of 5977df9d4848858cbde157c6723dd1de.nca
# 3. inside 1 [romfs]\rom\Stardust_JP\Textures you'll find texture_pack.cpio. Extract it (I uzed 7zip)
# 4. run this python 2.7 script in the directory with all the .rpt files. It'll create a out folder containing all the PNGs
import struct,glob,os,zlib
from PIL import Image
OUTDIR='out'
@foone
foone / videonics.txt
Created October 24, 2020 03:29
IR remote codes (NEC protocol) for the Videonics remote control
POWER=812EB847
HELP=812E9867
1=812E807F
2=812EA05F
3=812E906F
4=812EB04F
5=812E8877
6=812E00FF
7=812E20DF
8=812E10EF
@foone
foone / fix-acronia-scores.py
Created November 17, 2020 00:56
A script to patch score values to Acronia 0.4
import array,os,struct
game_bin=array.array('B')
with open('ACRONIA.EXE','rb') as f:
f.seek(0,os.SEEK_END)
size=f.tell()
f.seek(0,os.SEEK_SET)
game_bin.fromfile(f,size)
OFFSETS=[
0x3aa3b,