Skip to content

Instantly share code, notes, and snippets.

View u1i's full-sized avatar

Uli u1i

View GitHub Profile
@u1i
u1i / doit.txt
Created June 21, 2021 11:28
pdftk MacOs M1
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg
@u1i
u1i / doit.sh
Created April 4, 2024 01:12
shred
find . -type f -exec openssl enc -aes-256-cbc -pass pass:mypassword -nosalt -in {} -out {}.tmp \; -exec mv {}.tmp {} \;
@u1i
u1i / start_docker_registry.bash
Last active March 23, 2024 05:54 — forked from PieterScheffers/start_docker_registry.bash
Start docker registry with letsencrypt certificates and Basic Auth
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@u1i
u1i / info.txt
Created March 2, 2024 02:06
writing style
"Write in a conversational and engaging style that mirrors a friendly chat. Use descriptive language to vividly convey ideas, choosing action verbs and thoughtful adjectives for depth. Incorporate provocative phrases to spark curiosity and human-centered words to emphasize emotions and connections.
Avoid excessive jargon, fluff, and clichés. Prioritize clear, specific language over formal or ambiguous terms. Steer clear of negative tones and overly complex expressions, aiming for approachable and relatable wording."
@u1i
u1i / info.txt
Created February 15, 2024 01:44
TURD Stack
T - Terrible user interfaces
U - Unreliable databases
R - Redundant frameworks
D - Dated infrastructure
@u1i
u1i / l.py
Created October 25, 2023 14:00
HTTP Listener
from flask import Flask, request
app = Flask(__name__)
@app.route('/', defaults={'path': ''}, methods=["GET", "POST", "PUT", "DELETE"])
@app.route('/<path:path>', methods=["GET", "POST", "PUT", "DELETE"])
def catch_all(path):
# Print the incoming request and payload
print(f"Incoming Request: {request.method} {request.url}")
if request.data:
@u1i
u1i / sl.py
Created October 23, 2023 07:34
Selenium Test
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.service import Service
# Replace with the URL of your Selenium Grid hub on localhost.
grid_hub_url = "http://localhost:4444/wd/hub"
# Set the Chrome browser options.
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless") # Example: Run Chrome in headless mode.
@u1i
u1i / doit.sh
Created October 23, 2023 07:33
Selenium Docker
docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome
import time
from locust import HttpUser, task, between
class QuickstartUser(HttpUser):
wait_time = between(1, 2)
@task
def index_page(self):
self.client.get("/")
@u1i
u1i / 2048.py
Created July 2, 2023 08:09
2048 Game in Python
import curses
from random import randrange, choice
from collections import defaultdict
# Initialize the game
actions = ['Up', 'Down', 'Left', 'Right']
keys = [ord('w'), ord('s'), ord('a'), ord('d')]
actions_dict = dict(zip(keys, actions))