Skip to content

Instantly share code, notes, and snippets.

View pat-richter's full-sized avatar

Patrick Richter pat-richter

View GitHub Profile
@pat-richter
pat-richter / twitter enhance
Last active November 2, 2022 09:05
2 helpful links for my twitter experience(expanding "Tweak New Twitter" user script)
async function createLatestTweetsLink(currentPage) {
let $nameContainer = await getElement(`[data-testid="UserName"] > div > div > div:last-child`, {
name: 'User ID',
stopIf: pageIsNot(currentPage),
})
if ($nameContainer == null) return
// open search page
let searchParamsTwitter = `from:${$nameContainer.innerText}`;
### JavaScript to be executed on mediathekviewweb.de via DevTools
### Copies all high resolution links to your clipboard
copy([...document.querySelectorAll('.movie-icon')].map((a) => {
let seriesTitle = a.closest('tr').querySelector("td:nth-child(2)").innerText;
let episodeTitle = a.closest('tr').querySelector("td:nth-child(3)").innerText;
let fileName = seriesTitle + ' - ' + episodeTitle;
return '<a '+
'href="' + a.parentElement.href + '#filename=' + fileName +'" ' +
'>'+fileName+'</a>'
}));
<?php
/**
needs a table with "link" to each chapter
you may get it from sitemap (https://www.bibleserver.com/robots.txt)
**/
error_reporting(E_ALL);
require_once ('sqlwrapper/MysqliDb.php');
DISPLAY=:0.0
XAUTHORITY=/home/matrix/.Xauthority
*/20 * * * * /bin/bash /home/patrick/Tools/Scripts/healthy.sh
#!/bin/bash
Tip=$[ 1 + $[ RANDOM % 23 ]]
Tips[1]='Dehnung: Arm dehnen, benutz dein Bein!';
Tips[2]='Dehnung: Schulter/Arm dehnen mit der Hand an der Wand und Kopf in die Gegenrichtung'
Tips[3]='Dehnung: Hand drehen an der Wand'
Tips[4]='Dehnung: Rücken dehnen (beugen in alle Richtungen, mit Armen)'
Tips[5]='Dehnung: Durchgestreckte Arme, linke Hand zieht rechte Faust nach oben'