Skip to content

Instantly share code, notes, and snippets.

View wikrie's full-sized avatar

wikrie wikrie

View GitHub Profile
@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 .
@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 / 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 / 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
#!/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 / 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 / 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 / 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
@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 / create-vhost.sh
Created July 4, 2017 07:38
create a VHOST with SSL Letsencrypt on RASPI
#!/bin/bash
# Script for creating Vhosts with nginx conf and Letsencrypt Cert directly.
read -p "Gib die komplette URL der Domain ein: " domain
# mit www-data Berechtigung das HTML ROOT anlegen
sudo -u www-data mkdir /var/www/vhosts/$domain
# die standard Index files rein kopieren.
sudo cp /var/www/html/index.nginx-debian.html /var/www/vhosts/$domain/index.html
# ein nginx conf file erstellen
sudo cp /etc/nginx/templates/template.conf /etc/nginx/templates/tmp/$domain'.conf'
# in dem erstellten conf file die defuialt werte mit den domain werten überschreiben