This file contains hidden or 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 | |
| ## 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. |
This file contains hidden or 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 | |
| # 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} |
This file contains hidden or 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 | |
| # 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 |
This file contains hidden or 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
| // ==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 |
This file contains hidden or 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
| 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 . |
This file contains hidden or 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 | |
| ## 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 |
This file contains hidden or 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 | |
| // 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 |
This file contains hidden or 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 | |
| # 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` |
This file contains hidden or 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 | |
| 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 |
This file contains hidden or 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 | |
| file=`kdialog --getopenfilename /home '*.pdf'` | |
| pdf2ps $file tmp.ps && ps2pdf tmp.ps $file-small.pdf && rm tmp.ps |
NewerOlder