Skip to content

Instantly share code, notes, and snippets.

@rena2019
rena2019 / serial_port_via_ssh.txt
Last active November 7, 2024 23:24
serial port via SSH
#1. ESP32 @ /dev/ttyS7 <-> /dev/ttyV1
# baudrate auf 115200 setzen (ist erforderlich)!
stty -F /dev/ttyS7
# virtuellen port /tmp/ttyV1 erstellen und mit /dev/ttyS7 verbinden mit -x => verbose hexadecimal dump of data traffic
socat -x PTY,link=/tmp/ttyV1,raw,echo=0,crnl /dev/ttyS7,b115200,raw,echo=0
#per tio output anschauen
tio /tmp/ttyV1
#2. dasselbe mit Umweg über IP/Port: /dev/ttyS7 <-> localhost:54321 <-> /tmp/ttyV1
socat -dd /dev/ttyS7,b115200,raw,echo=0 tcp-listen:54321
@rena2019
rena2019 / threads_partyhütchen_symbol_left.svg
Last active July 8, 2024 05:00
Threads Partyhütchen Symbol (left)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rena2019
rena2019 / threads_partyhütchen_symbol_right.svg
Last active July 8, 2024 05:00
Threads Partyhütchen Symbol (right)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rena2019
rena2019 / wickie.bat
Created February 22, 2024 16:57
Wickie und die starken Männer - Mediathek Download Skript
@REM https://www.zdf.de/serien/wickie-classics
curl https://nrodlzdf-a.akamaihd.net/dach/zdf/17/06/170625_0600_sendung_wki/1/170625_0600_sendung_wki_3360k_p36v15.mp4 --output S01E01_Der_Wettlauf.mp4
curl https://nrodlzdf-a.akamaihd.net/dach/zdf/17/07/170702_0600_sendung_wki/1/170702_0600_sendung_wki_3360k_p36v15.mp4 --output S01E02_Die_Falle.mp4
curl https://nrodlzdf-a.akamaihd.net/dach/zdf/17/07/170709_0600_sendung_wki/1/170709_0600_sendung_wki_3360k_p36v15.mp4 --output S01E03_Die_Flucht.mp4
curl https://nrodlzdf-a.akamaihd.net/dach/zdf/17/07/170716_0600_sendung_wki/1/170716_0600_sendung_wki_3360k_p36v15.mp4 --output S01E04_Der_hohle_Zahn.mp4
curl https://nrodlzdf-a.akamaihd.net/dach/zdf/17/07/170723_0600_sendung_wki/1/170723_0600_sendung_wki_3360k_p36v15.mp4 --output S01E05_Der_Schreckliche_Sven.mp4
curl https://nrodlzdf-a.akamaihd.net/dach/zdf/17/07/170730_0600_sendung_wki/1/170730_0600_sendung_wki_3360k_p36v15.mp4 --output S01E06_Uebers_Ohr_gehauen.mp4
curl https://nrodlzdf-a.akamaihd.net/dach/zdf/17/08/1
@rena2019
rena2019 / threads_post.py
Last active November 13, 2024 18:26
Post @ Threads with Selenium
def threads_post(account="", pwd="", post="", display=False):
#2024-02-18 threads post (with selenium)
# TODO replace sleep with wait
# try:
# element = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "tag_id"))
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.keys import Keys
@rena2019
rena2019 / es_war_einmal.bat
Last active June 5, 2024 05:16
Downloadskript für die ersten 3 Staffeln "Es war einmal der Mensch"
curl https://nrodlzdf-a.akamaihd.net/de/zdf/23/12/231202_0635_sendung_esw/4/231202_0635_sendung_esw_a1a2_6660k_p37v17.mp4 --output S01_E01_Eine_neue_Welt_entsteht.mp4
curl https://nrodlzdf-a.akamaihd.net/de/zdf/23/12/231202_0700_sendung_esw/1/231202_0700_sendung_esw_a1a2_6660k_p37v17.mp4 --output S01_E02_Die_Neandertaler.mp4
curl https://nrodlzdf-a.akamaihd.net/de/zdf/23/12/231202_0725_sendung_esw/1/231202_0725_sendung_esw_a1a2_6660k_p37v17.mp4 --output S01_E03_Ein_Mensch_aus_Cro-Magnon.mp4
curl https://nrodlzdf-a.akamaihd.net/de/zdf/23/12/231202_0750_sendung_esw/1/231202_0750_sendung_esw_a1a2_6660k_p37v17.mp4 --output S01_E04_Macht_euch_die_Erde_untertan.mp4
curl https://nrodlzdf-a.akamaihd.net/de/zdf/23/12/231202_0815_sendung_esw/1/231202_0815_sendung_esw_a1a2_6660k_p37v17.mp4 --output S01_E05_Die_ersten_Weltreiche.mp4
curl https://nrodlzdf-a.akamaihd.net/de/zdf/23/12/231202_0840_sendung_esw/1/231202_0840_sendung_esw_a1a2_6660k_p37v17.mp4 --output S01_E06_Die_Zeit_des_Perikles.mp4
curl https://nrodlzdf-a.ak
@rena2019
rena2019 / create_bsky_post_with_link.py
Created October 22, 2023 16:48
Create Bluesky post with link
# python -m pip install atproto
# https://atproto.blue/en/latest/readme.content.html#installing
from atproto import Client, models
client = Client()
profile = client.login('xxxxxx.bsky.social', 'APP-PASSWORD')
client.com.atproto.repo.create_record(
models.ComAtprotoRepoCreateRecord.Data(
repo=client.me.did,
collection=models.ids.AppBskyFeedPost,
record=models.AppBskyFeedPost.Main(created_at=client.get_current_time_iso(),
@rena2019
rena2019 / mympitest.py
Created August 25, 2023 21:38
mpi.install Test
def mympitestfunc():
return 123
@rena2019
rena2019 / Dockerfile
Last active June 15, 2023 20:52
Dockerfile for Linux @ ESP32-S3
# Booting linux on ESP32s3
# http://wiki.osll.ru/doku.php/etc:users:jcmvbkbc:linux-xtensa:esp32s3
#################
# docker build -t esp32linux -f Dockerfile .
# docker run -it --name esp32linux esp32linux
FROM ubuntu:22.04
# ubuntu:20.04 does not work because autoconf 2.xx ist required
RUN apt-get update && apt-get install git build-essential autoconf flex texinfo unzip help2man file gawk wget bison libncurses-dev -y
WORKDIR /myapp
#ubuntu 22.04: libtool 2.4.6-15build2
#!/bin/bash
# https://www.zdf.de/serien/killing-eve
wget -O S01E01_Nettes_Gesicht.mp4 https://tvdlzdf-a.akamaihd.net/de/zdf/23/03/230324_2305_sendung_kev/1/230324_2305_sendung_kev_a1a2_6660k_p37v17.mp4
wget -O S01E02_Ihn_werde_ich_spaeter_los.mp4 https://nrodlzdf-a.akamaihd.net/de/zdf/23/04/230401_0005_sendung_kev/1/230401_0005_sendung_kev_a1a2_6628k_p61v17.mp4
wget -O S01E03_Ich_kenn_Sie_doch.mp4 https://nrodlzdf-a.akamaihd.net/de/zdf/23/03/230325_0030_sendung_kev/1/230325_0030_sendung_kev_a1a2_6628k_p61v17.mp4
wget -O S01E04_Sorry_Baby.mp4 https://nrodlzdf-a.akamaihd.net/de/zdf/23/03/230325_0110_sendung_kev/1/230325_0110_sendung_kev_a1a2_6628k_p61v17.mp4
wget -O S01E05_Ich_habe_eine_Vorliebe_fuer_Badezimmer.mp4 https://tvdlzdf-a.akamaihd.net/de/zdf/23/03/230325_0155_sendung_kev/1/230325_0155_sendung_kev_a1a2_6660k_p37v17.mp4
wget -O S01E06_Steckt_mich_ins_Loch.mp4 https://tvdlzdf-a.akamaihd.net/de/zdf/23/03/230325_0235_sendung_kev/1/230325_0235_sendung_kev_a1a2_6660k_p37v17.mp4
wget -O S01E07_Ich_will_nicht