Skip to content

Instantly share code, notes, and snippets.

View msowho's full-sized avatar
🕺
i had the time of my life

Mikhail "ponodoro" Serebryakov msowho

🕺
i had the time of my life
View GitHub Profile
@msowho
msowho / py_ubi_crc.py
Created August 29, 2022 08:22 — forked from InvoxiPlayGames/py_ubi_crc.py
py_ubi_crc.py - a python ubiart (?) crc32 implementation
# python ubiart (?) crc32 implementation by github.com/InvoxiPlayGames
# function usage - crc(bytearray), if using a string, crc(bytearray(uppercasestring, "utf8"))
# code licensing: don't be a dick with it, credit for general usage would be nice but not required
# if you use parts of this python script in your own project, credit is required
import math
def shifter(a, b, c):
# the masks are because python likes to get excited with bit shifting
d = 0
a = (a - b - c) ^ (c >> 0xd)
@msowho
msowho / http.gd
Created August 13, 2022 19:44 — forked from vinod8990/http.gd
Http downloader class for Godot
#Http downloader class for Godot
#This is a simple http downloader class which can be used to download anything from an http url
#USAGE
#Create a new scene "http.xml", with a root Node and attach this script
#Then in other scripts where you want to download something
#var http = preload("res://http.xml").instance()
#http.connect("loading",self,"_ondownloading")
#http.connect("loaded",self,"_ondownloaded")
#http.get(domain,url,port,useSSL)
@msowho
msowho / docker-compose.flask-rq-scheduler-example.yml
Created July 30, 2022 17:55 — forked from k24/docker-compose.flask-rq-scheduler-example.yml
Example of docker-compose for Flask-RQ2 with scheduler
version: '3'
services:
web:
build: .
image: server
container_name: server_web
command: flask run --host=0.0.0.0
ports:
- "5000:5000"
depends_on:
@msowho
msowho / afs_reader.py
Created July 2, 2022 18:55
Sonic Unleashed (PS2) AFS reader
from io import BytesIO
import struct
toc = []
filename_directory = []
with open(input("Input file: "), "rb") as f:
assert f.read(4) == b"AFS\x00"
files_nb = range(struct.unpack("I", f.read(4))[0])