Skip to content

Instantly share code, notes, and snippets.

View NicoWeio's full-sized avatar

Nicolai Weitkemper NicoWeio

View GitHub Profile
@NicoWeio
NicoWeio / main.js
Created June 23, 2023 22:24
Extract video links from TikTok user page
copy(
Array.from(document.querySelectorAll(".e1cg0wnj1")).map((x) => x.children[0].href).join("\n")
)
@NicoWeio
NicoWeio / query_domain_time.py
Created May 7, 2022 14:25
time spent on a domain | Query for ActivityWatch
# Returns the total non-AFK time spent on a specific domain.
# Note that this doesn't care if the browser is in focus.
# Paste this into http://localhost:5600/#/query
# Tested for ActivityWatch 0.11.0
afk_events = query_bucket(find_bucket("aw-watcher-afk_"));
web_events = query_bucket(find_bucket("aw-watcher-web")); # doesn't work with multiple browsers; pass a specific bucket name like "aw-watcher-web-firefox" if necessary
web_events = split_url_events(web_events);
DOMAINS = ["youtube.com"];
domain_events = filter_keyvals(web_events, "$domain", DOMAINS);
@NicoWeio
NicoWeio / update_song_names.sh
Created March 11, 2022 17:22
Use .inf files created by K3B to set track titles in ID3 metadata
for i in *.mp3; do mid3v2 -t "$(awk -F "=" '/Tracktitle/ {print $2}' "${i%.*}.inf" | tr -d "'")" "${i%.*}.mp3"; done
@NicoWeio
NicoWeio / Physik_4_Altklausur_Übersicht.md
Created July 28, 2021 08:05
Übersicht über Physik 4 Altklausur-Aufgaben

Physik 4 Altklausur-Aufgaben

2018_1

  1. Kurzfragen
  2. Potentialtopf
  3. Zeitentwicklung im unendlich hohen Potentialtopf
  4. Harmonischer Oszillator in Impulsdarstellung
  5. Wasserstoff-Atom
  6. Nichtentartete und entartete Störungsrechnung
  7. Drehimpulsalgebra

LERNZIELE DER PHYSIK 4 (SOSE 2021 )

Diese Übersicht soll die Lernziele aus den einzelnen Kapiteln transparent auflisten. Drei Sachen sind bei der Arbeit mit dieser Übersicht zu beachten:

  1. Es wird nicht jeder Satz und jedes Theorem einzeln ausgeschrieben, denn ein überliegendes Lernziel ist: Sie sollen in Ihrem Studium lernen, selbst einzuschätzen, welche Formeln und Rechenschritte für das Verständnis eines Themengebiets essenziell sind.
  2. Beachten Sie auch die Operatoren: Wer beispielweise ein System mit einer Methode_ analysieren möchte, muss die Methode dazu erst verstanden haben und anwenden können.
@NicoWeio
NicoWeio / join.sh
Created February 7, 2020 10:32
Push files to your device via Join by joaomgcd and transfer.sh; requires transfer, curl, grep
#!/bin/bash
echo Uploading $1 to transfer.sh…
FILEURL=$(transfer $1 | tail -1)
echo URL: $FILEURL
APIKEY='your-api-key'
DEVICEID='your-device-id'
RESULT=$(curl 'https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?file='"$FILEURL"'&deviceId='"$DEVICEID"'&apikey='"$APIKEY" 2>/dev/null)
if echo "$RESULT" | grep -q "\"success\": true"; then
echo "File sent successfully!"
exit 0
@NicoWeio
NicoWeio / WaWebProfilePictureScraper.js
Created October 19, 2019 08:20
WhatsApp Web Profile Picture Scraper - just paste into the console!
async function scrape() {
let allChats = [];
for (let i = 0; i < 250; i++) {
let allChatElements = document.querySelectorAll(".X7YrQ");
console.log("Iter ", i, allChatElements.length, " elements");