Skip to content

Instantly share code, notes, and snippets.

View Ari24-cb24's full-sized avatar
🔵
enjoying css

Ari van Houten Ari24-cb24

🔵
enjoying css
  • thejocraft.net
  • Germany
  • 03:19 (UTC +02:00)
  • X @AriOnIce24
View GitHub Profile
@Ari24-cb24
Ari24-cb24 / .env
Last active June 6, 2022 09:37
Discord Javascript & CSS Injector
PORT=31337
APPLICATION_ID=1337
@Ari24-cb24
Ari24-cb24 / time_cache.py
Last active May 22, 2022 08:14
Python Method Caching with specified time
import time
def time_cache(ttl: int):
def decorator(func):
ttls = {}
return_cache = {}
def wrapper(*args, **kwargs):
key = (*args,) + tuple([(k, v) for k, v in kwargs.items()])
@Ari24-cb24
Ari24-cb24 / webserver.py
Created March 31, 2022 16:01
A python webserver (experimental)
import time
import socket
OUTPUT = '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Hello World!</title></head><body>Hello World!</body></html>'
class WebServer:
def __init__(self, connection):
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
self.socket.bind(connection)
@Ari24-cb24
Ari24-cb24 / tech2022.md
Last active February 28, 2023 15:07
Technologies I might learn if I'm not too lazy in 2022

Technologies I want to learn in 2022

  • Svelte
  • SvelteKit
  • Xinu Approach (halfway)
  • Typescript
  • FastAPI
  • GraphQl
@Ari24-cb24
Ari24-cb24 / stringindicescomparisonpython.md
Last active December 28, 2021 15:25
String Indices Comparsion with Python

I compared 7 functions, which solely purpose was to figure out the indices of every uppercase letter.
I used timeit and plot the results using pyplot.
I wrote 6 testcases:

TEST_CASES = (
    "Hello World!",
    "".join(random.choice(string.ascii_letters) for _ in range(50)),
    "".join(random.choice(string.ascii_letters) for _ in range(100)),
    "".join(random.choice(string.ascii_letters) for _ in range(200)),