Skip to content

Instantly share code, notes, and snippets.

View wikrie's full-sized avatar

wikrie wikrie

View GitHub Profile
@wikrie
wikrie / fritzbox-cert-update.sh
Last active November 28, 2025 20:42
Fritzbox Fritz!Box AVM SSL Letsencrypt automatically update
#!/bin/bash
## this little Gist is for Copy the Letsencrypt Cert from an Linux machine (e.g. Raspberry PI or Synology NAS)
## to the router (Fritzbox).
## It is usefull to be able to speak to the Router over DDNS without any Cert issue in the Browser.
## thanks to https://gist.github.com/mahowi for the perfect Idea
## put it in /etc/letsencrypt/renewal-hooks/post so it gets run after every renewal.
## since Fritz OS 7.25 it is needed to select a Username, from a security point of view
## it is always a good idea to have a non default user name. And as normaly a Fritz Box
## is connected to the Internet, the prefered method should be WITH Username.
@wikrie
wikrie / tmux-install-2-5.sh
Created October 9, 2017 22:08
Install Tmux 2.5 Ubuntu
#!/bin/bash
# Steps to build and install tmux from source on Ubuntu.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.5
sudo apt-get -y remove tmux
sudo apt-get -y install wget tar libevent-dev libncurses-dev
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
@wikrie
wikrie / synology-fb-cert-transfer.sh
Last active October 22, 2023 13:26 — forked from FvdLaar/fritzbox-cert-update.sh
Fritzbox Fritz!Box AVM SSL Letsencrypt automatically update
#!/bin/bash
# parameters
USERNAME=""
PASSWORD="fritzbox-password"
CERTPATH="/usr/syno/etc/certificate/system/default/" ##this is the default Path for Synology Cert
CERTPASSWORD=""
HOST=http://192.168.178.1 ## I use IP instead of fritz.box for synology updates
# make and secure a temporary file
@wikrie
wikrie / Kleinanzeigen_Anzeige_duplizieren.js
Last active June 2, 2023 13:58 — forked from J05HI/eBay_Kleinanzeigen_Anzeige_duplizieren.js
eBay Kleinanzeigen - Anzeige duplizieren
// ==UserScript==
// @namespace https://github.com/J05HI
// @name eBay Kleinanzeigen - Anzeige duplizieren
// @description Bietet eine "Anzeige duplizieren" Funktion beim Bearbeiten einer vorhandenen Anzeige in eBay Kleinanzeigen.
// @icon http://www.google.com/s2/favicons?domain=www.kleinanzeigen.de
// @copyright 2020, J05HI (https://github.com/J05HI)
// @license MIT
// @version 1.0.2
// @match https://www.kleinanzeigen.de/p-anzeige-bearbeiten.html?adId=*
// @grant none
@wikrie
wikrie / ohmyshell.sh
Created December 12, 2021 20:16
get ohmyzsh inc ohmytmux up and running in one step
sudo apt install zsh tmux git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/wikrie/ohmyzsh/master/tools/install.sh)"
cd ~
git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf
cp .tmux/.tmux.conf.local .
#!/bin/bash
## all Fail2Ban Log should be logged into /var/log/fail2ban.log then this will work
## you need geoiplookup to get it runningyou can install it with sudo apt install geoip-bin
cat /var/log/fail2ban.log* | grep Ban | sed 's/.*[Bb]an \(.*\)/\1/' | uniq | while read line; do geoiplookup $line; done | sort | uniq -c | sort -nr
@wikrie
wikrie / ispconfig-metronome2prosody.sh
Last active June 26, 2018 14:49
XMPP ISPCONFIG 3.1 change Metronome to Prosody for Debian Stretch based on Perfect Server
#/bin/bash
// stop metronome service
service metronome stop
// killall existing xmpp instances
killall lua5.1
//disable default starting from metronome
systemctl disable metronome
//remove the init script to ETC folder for backup reason
mv /etc/init.d/metronome /etc/metronome/metronome_initscript.old
// install prosody after updating sources
@wikrie
wikrie / check-password.sh
Created April 19, 2018 14:08
Check if password is powned by https://haveibeenpwned.com
#!/bin/bash
# check if password was insert
if [ $# -eq 0 ]
then
echo "no password was insert, syntax is ./check-password.sh password"
else
#create sha1sum of password for transfering to online check
sha1pass=`echo -n "$1" | sha1sum | cut -d ' ' -f1`
#run test and get a result from api
result=`curl -s https://api.pwnedpasswords.com/pwnedpassword/$sha1pass`
@wikrie
wikrie / shrink-pdf.sh
Last active February 4, 2018 14:12
shrink size of a pdf file terminal edition
#!/bin/bash
read -e -p "Please insert file: " file
if test -e $file
then pdf2ps $file tmp.ps && ps2pdf tmp.ps $file-small.pdf && rm tmp.ps
else echo "File not found!"
fi
@wikrie
wikrie / shrink-pdf-gui.sh
Last active September 25, 2017 21:35
shrink size of a pdf file with kde kdialog
#!/bin/bash
file=`kdialog --getopenfilename /home '*.pdf'`
pdf2ps $file tmp.ps && ps2pdf tmp.ps $file-small.pdf && rm tmp.ps