Skip to content

Instantly share code, notes, and snippets.

@Wikinaut
Wikinaut / breaking-news.sh
Created January 18, 2021 17:20
Breaking-News image generator
#!/bin/bash
# Imagegenerator for "Breaking News"
# Init 20210112
if [[ $# -ne 3 ]] ; then
echo "Usage:"
echo "breaking-news \"headline-text\" \yellow-ribbon-text\" imagefile"
exit
fi
Abfallartenkatalog
Abfallartenkataloge
Abfallartenkatalogen
Abfallartenkatalogs
Abfallkatalog
Abfallkataloge
Abfallkatalogen
Abfallkatalogs
Abgaskatalysator
Abgaskatalysatoren
@Wikinaut
Wikinaut / bkat.sh
Last active July 3, 2020 18:57
Commandline-Suche im Bundeseinheitlichen Bußgeldkatalog (BKAT)
# Aufruf: bkat.sh <needle>
if [ ! -f "bkat.txt" ] ; then
if [ ! -f "bkat.pdf" ] ; then
wget -O bkat.pdf "https://www.kba.de/DE/ZentraleRegister/FAER/BT_KAT_OWI/bkat_owi_28_04_2020_pdf.pdf?__blob=publicationFile&v=7"
fi
pdftotext -layout bkat.pdf bkat.txt
fi
egrep -A9 -i --color=always "$1" bkat.txt
@Wikinaut
Wikinaut / jitsipatch.sh
Last active April 2, 2020 18:22
Patches for Jitsi
# Patches for jitsi
#
# see/filed as https://github.com/jitsi/jitsi-meet/pull/5264
# optionally fetch the nightly build:
apt update
apt upgrade
sed -e "s/LANG_DETECTION: false/LANG_DETECTION: true/" -i /usr/share/jitsi-meet/interface_config.js
from glob import glob
from pydub import AudioSegment
i = 0
for name in sorted(glob("*.mp3")):
i = i+1
print str(i)+" "+name
playlist_songs = [AudioSegment.from_mp3(mp3_file) for mp3_file in sorted(glob("*.mp3"))]
#!/usr/bin/python
# copy all files used in a m3u playlist to a new subdirectory
# and prefix the filenames with a number nnnn00 in ascending order
# initial version 20200206
#
# based on ideas from https://forum.videolan.org/viewtopic.php?t=114141
import os.path, shutil, sys
def main():
@Wikinaut
Wikinaut / README.md
Last active July 29, 2020 21:37 — forked from tordans/README.md
Vereinfachte Verkehrsordnungswidrigkeitenanzeige bei Halt- und Parkverstößen per E-Mail an die Bußgeldstelle
@Wikinaut
Wikinaut / gist:e8400f174bc9f79957b1f6dd4a97f56c
Last active February 28, 2019 01:26
Linuxmint Can't create desktop launcher [SOLVED]
see
https://forums.linuxmint.com/viewtopic.php?p=1578018#p1578018
The bug has been fixed in the source so fingers crossed another cinnamon update will come out fairly quickly.
https://github.com/linuxmint/Cinnamon/commit/c42a03a01e988ad6160187c7697425cd99992f08
If not to apply the fix now download the attached patch file
cinnamon-desktop-editor-c42a03a.py.patch
@Wikinaut
Wikinaut / gist:986e49baf516a0d459e35c6148517cb6
Last active December 25, 2018 22:14
35c3 Fahrplan to PDF: How to create coloured PDFs from the 35C3 Fahrplan https://twitter.com/Wikinaut/status/1077679091514515456
# Firefox lovers use
for i in 1 2 3 4; do firefox --headless --screenshot $i.pdf https://fahrplan.events.ccc.de/congress/2018/Fahrplan/schedule/$i.html; done
# Chromium lover use
for i in 1 2 3 4;do chromium --headless --disable-gpu --print-to-pdf=$i.pdf https://fahrplan.events.ccc.de/congress/2018/Fahrplan/schedule/$i.html;done
# the simple way: fetch the small B/W pdf and compose a single pdf
for i in 1 2 3 4; do wget https://fahrplan.events.ccc.de/congress/2018/Fahrplan/schedule/$i.pdf; done
# put all into one file
convert -size 400x200 xc:none -font Hack-Bold -pointsize 25 -kerning 1 -gravity center -fill red -annotate 330x330+0+0 "Vorabzug - nicht für Veröffentlichung" -fill yellow -annotate 330x330+2+2 "Vorabzug . nicht für Veröffentlichung" WATERMARK_FILE.png
for i in *.jpg; do composite -dissolve 20% -tile WATERMARK_FILE.png $i ${i%.*}_x.jpg; done