Skip to content

Instantly share code, notes, and snippets.

View ice1x's full-sized avatar

ice1x ice1x

  • Estonia
View GitHub Profile
@nekufa
nekufa / env.py
Created September 4, 2023 12:15
import re
from inspect import getmembers, isclass
from os import path
from posixpath import abspath
from schemas import settings
base = settings.BaseSettings.schema()
info = ''
toc = ''
@hellovertex
hellovertex / consumer_db.py
Created April 26, 2021 15:00
Faust App that redirects websocket traffic via Kafka topic
"""
1. Launch Kafka:
- $KAFKA_HOME/bin/zookeeper-server-start.sh $KAFKA_HOME/config/zookeeper.properties
- $KAFKA_HOME/bin/kafka-server-start.sh $KAFKA_HOME/config/server.properties
run via faust -A <filename> worker -l info
2. Faust library:
faust.App.agent: - main processing actor in Faust App
"""
@claymcleod
claymcleod / pycurses.py
Last active October 30, 2025 14:50
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()
@ygotthilf
ygotthilf / jwtRS256.sh
Last active October 29, 2025 15:38
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@jefftriplett
jefftriplett / tor.py
Last active March 19, 2025 16:34
Python Requests + Tor (Socks5)
"""
setup:
pip install requests
pip install requests[socks]
super helpful:
- http://packetforger.wordpress.com/2013/08/27/pythons-requests-module-with-socks-support-requesocks/
- http://docs.python-requests.org/en/master/user/advanced/#proxies
"""