This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mit http | |
# funktioniert sofort. | |
query="linux%20worms";lynx -dump -cookies="" --display_charset=utf-8 "http://google.com/search?q=$(echo $query | sed 's/ /+/g')"|grep '^[[:blank:]][[:blank:]].[[:digit:]][[:punct:]]'| grep http://www.google.com/url\?q=http | sed -e 's/http:\/\/www.google.com\/url?q=//g' |sed -e 's/&sa=.*$//g'|grep -v google | cut -c5- | sed -rn "=;p;"| sed -r "N;s/\n//" | sed -e "s/\<\([0-9]\{1,2\}\)\>/0000\1/; s/\<0*\([0-9]\{2\}\)\>/\1/" |sed -e "s/^/ /g"| sed -e "s/\./;/1" > googlequery.csv | |
# mit https und cookies. | |
# Damit die Zeile funktioniert: | |
# zuerst "lynx-cookies -accept_all_cookies https://www.google.com" | |
# dann das Zeugs bestätigen damit alle Cookies persistent gesetzt sind | |
# danach funktioniert diese Zeile solange die Cookies nicht gelöscht werden. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemctl start tor | |
yt-dlp --proxy socks5://127.0.0.1:9050 https://www.youtube.com/watch?v= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cdstoolbox as ct | |
# Application plotting climate stripes of temperature anomaly. | |
@ct.application(title='Climate Stripes') | |
@ct.output.livefigure() | |
def plot_time_series(): | |
# Retrieve surface temperature data between 1979 and 2022 | |
data = ct.catalogue.retrieve( | |
'reanalysis-era5-single-levels', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import OrderedDict | |
import cdstoolbox as ct | |
# Define dictionary of cities to extract data from | |
cities = OrderedDict({ | |
'Worms': {'lat': 49.6327, 'lon': 8.3591}, | |
'Rosenheim': {'lat': 47.85637,'lon': 12.1224}, | |
'Emden': {'lat': 53.36745, 'lon': 7.2077}, | |
'Aachen': {'lat': 50.7766,'lon':6.08342}, | |
'Dresden': {'lat': 51.05089,'lon': 13.7383}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
# Modify the port name to match your serial port | |
port = serial.Serial('/dev/ttyUSB0', 2400, timeout=1, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE) | |
# Read data from the serial port | |
while True: | |
# Read 2-byte preamble | |
preamble = port.read(2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# xdotool is necessary | |
# Search for the visible Firefox window(s) and get its window ID | |
window_id=$(xdotool search --onlyvisible --class "firefox") | |
# Send the keyboard shortcut to open the URL bar, copy the URL to clipboard and then close the URL bar by sending the Escape key. | |
# The command is sent to the Firefox window with the specified ID using the --window option. | |
xdotool key --window $window_id --delay 20 --clearmodifiers ctrl+l ctrl+c Escape |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# enable for X | |
# import "$HOME"/bin/kdialog/toot.png | |
# enable or Wayland | |
spectacle -b -r -o "$HOME"/bin/kdialog/toot.png | |
wait | |
a=$(kdialog --textinputbox "Dialog-Tooter" "$1") | |
if [[ $? = 0 ]]; then | |
echo "$a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
me="weine-webseite.de" | |
b="%20intitle:index.of" | |
echo "Verzeichnisse, bei denen das Directory Listing aktiv ist: ($b)" | |
a=$(lynx -dump $(echo "http://www.google.com/search?channel=fs&q=site:$me$b")) && echo "$a"| grep "Es wurden keine mit deiner Suchanfrage " || echo "$a" | grep '^[[:blank:]][[:blank:]].[[:digit:]][[:punct:]].*com/url\?.*'| grep -v "accounts\|support\.google" | |
b="%20ext:xml%20|%20ext:conf%20|%20ext:cnf%20|%20ext:reg%20|%20ext:inf%20|%20ext:rdp%20|%20ext:cfg%20|%20ext:txt%20|%20ext:ora%20|%20ext:ini" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2K | |
Searching toots for bash 1 of 2266 [#>---------------------------] 0.04% | |
Found toot: #Linux #Bash Skript Da gibt man sich Mühe mit seiner ASCII-Kunst und wenn man das Werk in einer Webseite anzeigen lassen will, ist alles kaputt wegen dem falschen Zeichenfont. dort. Diese Skript macht einr PNG-Grafik und dann passt das immer. https://gist.github.com/dewomser/cea719bec695d36d9e083d46ba13257a Beispiel:Die Stadt Worms.de hat einen informativen Rss-Feed. Hier kommt der Link zum Bild:https://www.worms.de/neu-de/aktuelles/meldungen/2023-10-12-10-28-00.php | |
Date: 16 Oct 23 14:40 UTC | |
URL: https://social.tchncs.de/@dewomser/111245213231688902 | |
Found toot: #bash exifFoto Beschreibung als Text in *.txtFür eine #Fotoshow, soll für jedes Photo eine gleichlautende Datei aber mit Endung txt erstellt werden.Verwende zusätzlich "Keywords" aus dem Metatags Exif ! for i in {5..7} ;do photo=100_125$i; exif=$(exiftool -Keywords $ |