Skip to content

Instantly share code, notes, and snippets.

@clach04
clach04 / sjcl_simple
Created March 20, 2022 00:15 — forked from g-p-g/sjcl_simple
SJCL encrypt / decrypt in Python
import os
from base64 import b64decode, b64encode
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from cryptography.hazmat.backends import default_backend
_BACKEND = default_backend()
@eatonphil
eatonphil / psql-srv.py
Last active March 30, 2026 07:39 — forked from matteobertozzi/psql-srv.py
postgres "server" wire protocol example (ported python3)
# th30z@u1310:[Desktop]$ psql -h localhost -p 55432
# Password:
# psql (9.1.10, server 0.0.0)
# WARNING: psql version 9.1, server version 0.0.
# Some psql features might not work.
# Type "help" for help.
#
# th30z=> select foo;
# a | b
# ---+---
@mikegrima
mikegrima / proper_speed.md
Last active April 11, 2025 05:30
Make Ur-Quan Masters Playable

The Ur-Quan Masters Gameplay Speed Reduction

I loved playing Star Control on the Sega Genesis and was really happy that The Ur-Quan Masters came out. However, I find that the ship combat speed is way too fast. If you've played the Sega Genesis version of Star Control, you'd be used to a much slower gameplay speed.

It turns out that you can make Ur-Quan Masters run at a similar (or whatever) speed you want: you just need to edit the source code to do this. However, the good news is, it's pretty straightforward.

TL;DR: What do I fix?

@kahnwong
kahnwong / aegis_to_tokenvault.py
Created November 26, 2021 07:38
aegis_to_tokenvault.py
import json
import os, glob
filename = glob.glob("*plain*.json")[0]
with open(filename, "r") as f:
d = json.loads(f.read())
data = d["db"]["entries"]
out = []

Flashback Protection Notes

Being released in the early 90s, the developers from Delphine Software protected the game code to prevent piracy.

On start (and later in the game !), the player would have to lookup some symbols in the manual provided with the game.

This document tries to list the game engine routines related to the game protection.

The addresses and routines are based on the disassembly of the French DOS version executable.

@RodneyRichardson
RodneyRichardson / wincred.py
Last active December 23, 2023 11:22 — forked from exhuma/wincred.py
Retrieve Windows Credential via Python
"""
Access windows credentials
Credentials must be stored in the Windows Credentials Manager in the Control
Panel. This helper will search for "generic credentials" under the section
"Windows Credentials"
Example usage::
result = get_generic_credential('foobar')
#!python
# Tested with `SC-8110-2D-B` 1d & 2d barcode scanner
#
# Inspired by https://github.com/julzhk/usb_barcode_scanner
# which was inspired by https://www.piddlerintheroot.com/barcode-scanner/
# https://www.raspberrypi.org/forums/viewtopic.php?f=45&t=55100
# from 'brechmos' - thank-you!
#
# This implementation doesn't directly decode hidraw stream, but uses
@wrecker
wrecker / cloudflare-ddns.service
Last active April 8, 2024 18:54
Cloudflare Dynamic DNS Script in Bash
[Unit]
Description=Cloudflare DDNS Service
[Service]
Type=simple
ExecStart=/full/path/to/cloudflare-ddns.sh
TimeoutStopSec=20
version: "3"
services:
sftpgo:
image: "drakkan/sftpgo:v2-alpine"
# default user id
user: 1026
restart: always
expose:
# HTTP
- "8080"