Skip to content

Instantly share code, notes, and snippets.

@rena2019
rena2019 / nimble_charts_line_chart_animation_zoom.dart
Created April 24, 2025 11:36
example LineAnimationZoomChart (LineChart + animate + pan/zoom)
//taken from https://github.com/Nimblesite/nimble_charts/blob/main/charts_flutter/example/lib/line_chart/animation_zoom.dart
import 'package:flutter/material.dart';
import 'dart:math';
//install with flutter pub add nimble_charts
import 'package:nimble_charts/flutter.dart' as charts;
void main() {
runApp(const MyApp());
}
@rena2019
rena2019 / nimble_charts_example.dart
Last active April 24, 2025 09:43
nimble_charts example
// taken from https://github.com/Nimblesite/nimble_charts/blob/main/charts_flutter/example/lib/line_chart/simple.dart
import 'package:flutter/material.dart';
import 'dart:math';
//install with flutter pub add nimble_charts
import 'package:nimble_charts/flutter.dart' as charts;
void main() {
runApp(const MyApp());
}
@rena2019
rena2019 / main.dart
Last active April 4, 2025 09:14
myconstructors.dart
class PointA {
double x = 1.0;
double y = 2.0;
// The implicit default constructor sets these variables to (1.0,2.0)
// PointA();
//
PointA(String s) : x = double.parse(s), y = double.parse(s);
@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 December 28, 2024 05:24
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(),