Skip to content

Instantly share code, notes, and snippets.

# forward browser to a myfritz address with rewrite
# adapt home.domain.tld, YOURHASH and port 12345 to your values
<VirtualHost *:80>
ServerName home.domain.tld
ServerAdmin webmaster@localhost
DocumentRoot /var/www/none/
ErrorLog /error.log
CustomLog /access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =home.domain.tld
@Marwe
Marwe / block_msrepo_on_rpi.sh
Created February 7, 2021 11:21
Block MS repo on raspbian
#!/bin/bash
# manual rasbian fix 2021-02-06 needed
# if added already, remove ms repos and prevent them being installed on PI with rasbian (done without consent or opt-in)
# https://www.reddit.com/r/rebhu/comments/lcos3c/microsoft_repo_installed_on_all_raspberry_pis/
# https://github.com/RPi-Distro/raspberrypi-sys-mods/issues/41#issuecomment-773220437
for i in /etc/apt/trusted.gpg.d/microsoft.gpg /etc/apt/sources.list.d/vscode.list
do
rm -vf "$i"
@Marwe
Marwe / pad_zipbackup_postprocess.sh
Created November 16, 2021 01:05
hedgedoc zip backup postprocessing
#!/bin/bash
trgd="./hedgedocpads/"
usage(){
echo "$0 path/to/archive.zip [targetdir (default: $trgd)"
echo "Download archive.zip from hedgedoc, see dropdown on login name, URL is https://hedgedocdomain.tld/me/export"
}
fd2nbin=$(which filedate2nameprefix.sh)
#!/bin/bash
for i in "$@"
do
dn=$(dirname "$i")
bn=$(basename "$i")
if grep -Eq '^[0-9]{4}-[0-9]{2}-[0-9]{2}_' <<< "$bn"
@Marwe
Marwe / download-digicrop-2022.sh
Last active March 28, 2022 08:17
digicrop 2022 download all pages and videos
#! /bin/bash
wget -r -nc -k https://digicrop.de/
for i in digicrop.de/*/index.html
do pushd $(dirname $i)
if [ -z "$(ls *.mkv *.webm)" ]
then
grep -o 'https://www.youtube.com/embed/[^\?]*' *.html| xargs youtube-dl
detox *
fi