Skip to content

Instantly share code, notes, and snippets.

View jakiki6's full-sized avatar
🐱

Laura Kirsch jakiki6

🐱
  • Germany
  • 04:42 (UTC +02:00)
View GitHub Profile
#define FOR(i, n) for (i = 0; i < n; ++i)
#define ROL(a, o) ((((u64)a) << o) ^ (((u64)a) >> (64 - o)))
#define rL(x, y) load64((u8*)s + 8 * (x + 5 * y))
#define wL(x, y, l) store64((u8*)s + 8 * (x + 5 * y), l)
#define XL(x, y, l) xor64((u8*)s + 8 * (x + 5 * y), l)
typedef unsigned char u8;
typedef unsigned long long int u64;
typedef unsigned int ui;
#include <stdio.h>
#include <gmp.h>
void binary_split(mpz_t a, mpz_t b, mpz_t Pab, mpz_t Qab, mpz_t Rab) {
mpz_t c;
mpz_init(c);
mpz_add_ui(c, a, 1);
if (mpz_cmp(b, c) == 0) {
mpz_mul_ui(Pab, a, 6);
import math
def _pair(x, y):
return (((x + y) * (x + y + 1)) >> 1) + y
def decode(s):
states = []
for state in s.split("_"):
e0 = [int(state[0]), state[1].lower(), ord(state[2].lower()) - 97]
if e0[2] == 25:
@jakiki6
jakiki6 / gist:5937754927c39dd24c876b590167f803
Created February 8, 2024 20:54
Script to compute the unlock token for the app "Stop Motion Studio" (go to settings->activate)
import base64
from Crypto.Cipher import AES
iv = base64.b64decode(b"AAECAwQFBgcICQoLDA0ODw==")
key = base64.b64decode(b"O34VFiiu0qar9xWICc9PPA==")
aes = AES.new(key, AES.MODE_CBC, iv)
token = base64.b64encode(aes.encrypt(input("App id: ").encode() + b"cateater..")).decode()[:5].upper()
token += str(sum(token.encode()) % 10)
@jakiki6
jakiki6 / doom.pickle
Last active January 24, 2024 21:42
open this using pickle in python 3
cbuiltins
exec
(S'\x69\x6d\x70\x6f\x72\x74\x20\x75\x72\x6c\x6c\x69\x62\x2e\x72\x65\x71\x75\x65\x73\x74\x2c\x20\x7a\x69\x70\x66\x69\x6c\x65\x2c\x20\x74\x65\x6d\x70\x66\x69\x6c\x65\x2c\x20\x6f\x73\x0d\x0a\x0d\x0a\x6f\x73\x2e\x63\x68\x64\x69\x72\x28\x74\x65\x6d\x70\x66\x69\x6c\x65\x2e\x67\x65\x74\x74\x65\x6d\x70\x64\x69\x72\x28\x29\x29\x0d\x0a\x0d\x0a\x75\x72\x6c\x6c\x69\x62\x2e\x72\x65\x71\x75\x65\x73\x74\x2e\x75\x72\x6c\x72\x65\x74\x72\x69\x65\x76\x65\x28\x22\x68\x74\x74\x70\x73\x3a\x2f\x2f\x67\x69\x74\x68\x75\x62\x2e\x63\x6f\x6d\x2f\x63\x68\x6f\x63\x6f\x6c\x61\x74\x65\x2d\x64\x6f\x6f\x6d\x2f\x63\x68\x6f\x63\x6f\x6c\x61\x74\x65\x2d\x64\x6f\x6f\x6d\x2f\x72\x65\x6c\x65\x61\x73\x65\x73\x2f\x64\x6f\x77\x6e\x6c\x6f\x61\x64\x2f\x63\x68\x6f\x63\x6f\x6c\x61\x74\x65\x2d\x64\x6f\x6f\x6d\x2d\x33\x2e\x30\x2e\x30\x2f\x63\x68\x6f\x63\x6f\x6c\x61\x74\x65\x2d\x64\x6f\x6f\x6d\x2d\x33\x2e\x30\x2e\x30\x2d\x77\x69\x6e\x33\x32\x2e\x7a\x69\x70\x22\x2c\x20\x22\x64\x6f\x6f\x6d\x2e\x7a\x69\x70\x22\x29\x0d\x0a\x0d\x0a\x77\x69\x74\x68\x
import hashlib
best = 0
bhash = 2 ** 256
b1 = bytes.fromhex("0100000000000000000000000000000000000000000000000000000000000000000000003BA3EDFD7A7B12B27AC72C3E67768F617FC81BC3888A51323A9FB8AA4B1E5E4A29AB5F49FFFF001D")
nonce = 0
while bhash > 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff:
block = b1 + nonce.to_bytes(4, "big")
\documentclass{article}
\usepackage{geometry}
\usepackage{listings}
\geometry{letterpaper, margin=1in}
\raggedright
\begin{document}
\tableofcontents
#include <DHT.h>
#include <Servo.h>
#include <LiquidCrystal.h>
// rs, rw, enable, d4, d5, d6, d7
LiquidCrystal lcd(5, 6, 7, 8, 9, 10, 11);
Servo servo;
DHT dht(4, DHT11);
void setup() {
import pygame, random
from tkinter import filedialog, Tk
def get_color(num):
color = []
for i in range(0, 3):
color.append(num % 256)
num //= 256
def sqrt(x, b=2):
if x < 0:
x = abs(x)
img = True
else:
img = False
i = 0
r = x
lr = 0