Skip to content

Instantly share code, notes, and snippets.

View u1i's full-sized avatar

Uli u1i

View GitHub Profile
@u1i
u1i / Caddyfile
Created August 4, 2024 04:50
Caddy docker letsencrypt
{
email me@privacy.net
}
test01.mydomain.tld {
reverse_proxy http://frontend:8080
}
2024-07-31 03:12:41,869:DEBUG:User Input: "give me 10 suggestions on article titles around robotics and AI and the impact on workforce. The titles must not contain colons."
2024-07-31 03:12:41,870:DEBUG:Director to Creative: "Here are the user's specific instructions: 'give me 10 suggestions on article titles around robotics and AI and the impact on workforce. The titles must not contain colons.'"
2024-07-31 03:12:46,303:DEBUG:Creative Agent's Suggestions:
1. "Rise of the Bots: How Robotics and AI are Redefining the Future of Work"
2. "The Automated Age: Navigating the Workforce Revolution with AI and Robotics"
3. "From Assembly Lines to Algorithms: The Robotic Transformation of Employment"
4. "Humans vs. Machines: The Impact of AI on Job Security and Career Evolution"
5. "Smart Machines, Smarter Workforce: Embracing AI and Robotics in Modern Employment"
@u1i
u1i / doit.sh
Created June 4, 2024 06:09
Mac: get mouse position
# pip3 install pyobjc
while true; do clear; echo "Mouse Position:"; python3 -c 'import Quartz.CoreGraphics as CG; print(CG.CGEventGetLocation(CG.CGEventCreate(None)))'; sleep 0.1; done
@u1i
u1i / doit.sh
Created May 29, 2024 01:53
Ollama curl
curl -i http://127.0.0.1:11434/api/generate -d '{
"model": "gemma:2b",
"prompt": "Why is the sky blue?",
"options": {
"temperature": 0.7
}
}'
@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 / 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