This file contains 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
wget https://github.com/tlhackque/BlockCountries/archive/master.zip | |
unzip master.zip | |
chmod 0755 BlockCountries-master/BlockCountries | |
cp BlockCountries-master/BlockCountries /etc/init.d/ | |
/etc/init.d/BlockCountries version | |
/etc/init.d/BlockCountries start -update | |
rm -r -v BlockCountries-master/ | |
rm -v master.zip* |
This file contains 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 | |
#echo "Login detected at $(hostname) / $(date +%d.%m.%Y) $(date +%H:%M:%S)" | |
#FROM=`echo $SSH_CONNECTION | awk '{ print $1 }'` | |
#echo "Benutzer: $USER@$FROM" | |
#echo | |
#echo -n "Uptime: " | |
#uptime | |
#echo | |
#echo "Last Login Activity: " | |
#last |
This file contains 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
mysql -uadmin -p`cat /etc/psa/.psa.shadow ` -D psa -e "delete from sessions where login like 'admin';" |
This file contains 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/sh | |
( /usr/local/bin/rkhunter --versioncheck | |
/usr/local/bin/rkhunter --update | |
/usr/local/bin/rkhunter --cronjob --report-warnings-only | |
) | |
#| /usr/bin/mail -s "rkhunter output" root@localhost |
This file contains 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
mkdir ~/.vim | |
mkdir ~/.vim/colors | |
wget https://raw.githubusercontent.com/nanotech/jellybeans.vim/master/colors/jellybeans.vim | |
mv jellybeans.vim ~/.vim/colors/ | |
touch ~/.vimrc | |
echo syntax on > ~/.vimrc | |
echo colorscheme jellybeans >> ~/.vimrc |
This file contains 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
# function to multiple change directory at once or jump back to an existing directory in the path | |
# using: cd.. n or cd.. dir or cd.. *part_of_directory* | |
function mcd() { | |
case $1 in | |
*[!0-9]*) # check if it is a number | |
cd $( pwd | sed -r "s|(.*/$1[^/]*/).*|\1|" ) # loopup for name or part of name of directory | |
;; # if not a number and not an existing directory of path do nothing | |
*) | |
cd $(printf "%0.0s../" $(seq 1 $1)); # change back directory n times | |
;; |
This file contains 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 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 | |
# 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 |
This file contains 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 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 |
OlderNewer