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 | |
outfile=${1::-4} | |
echo "converting to pem with chain" | |
openssl pkcs12 -in $1 -clcerts -nokeys -out $outfile.pem | |
echo "extracting key only" | |
openssl pkcs12 -in $1 -nocerts -out tmp_wk.key | |
echo "removing passphrase from key" | |
echo openssl rsa -in tmp_wk.key -out $outfile.key | |
rm tmp_wk.key | |
echo "done, CHECK YOUR CHAINS!!!" |
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 | |
sudo apt-get update -y | |
sudo apt-get install ubuntu-desktop -y | |
sudo apt-get install tightvncserver -y | |
sudo apt-get install gnome-panel gnome-settings-daemon -y | |
sudo apt-get install metacity nautilus gnome-terminal gnome-shell -y | |
sudo apt-get install ubuntu-gnome-desktop -y | |
mkdir ~/.vnc | |
cat > ~/.vnc/xstartup <<EOF | |
#!/bin/sh |
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
Chain fail2ban-postfix-sasl (1 references) | |
target prot opt source destination | |
REJECT all -- 178-222-247-254.static.isp.telekom.rs anywhere reject-with icmp-port-unreachable | |
REJECT all -- 183.240.55.119 anywhere reject-with icmp-port-unreachable | |
REJECT all -- 2.56.59.173 anywhere reject-with icmp-port-unreachable | |
REJECT all -- 37.0.8.6 anywhere reject-with icmp-port-unreachable | |
REJECT all -- 62.197.136.61 anywhere reject-with icmp-port-unreachable | |
REJECT all -- 5.34.207.118 anywhere reject-with icmp-port-unreachable | |
REJECT all -- 117.57.56.41 anywhere reject-with icmp-port-unreachable | |
REJECT all -- 5.34.204.154 anywhere reject-with icmp-port-unreachable |
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 script is intended to decrapify your Ubuntu, stuff like turn off unattended upgrades... | |
echo 'some of this should be done as root' | |
echo 'creating pubip' | |
# Ensure the directory exists | |
mkdir -p /root/scripts | |
# Write the script content to the 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
<?php | |
$socket = fsockopen("localhost", "11211", $errno, $errstr); | |
if($socket) { | |
echo "Connected. "; | |
} | |
else { | |
echo "Connection failed"; | |
} | |
fputs($socket, "flush_all\r\n"); | |
$buffer = ""; |
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 | |
# Add this to .git/hooks/commit-msg and chmod to be executable | |
# Author Aleksandar Pavic - buy my Redmine book - redmine cookbook | |
MSG="$1" | |
if ! grep -qE "refs \#[0-9].*" "$MSG";then | |
cat "$MSG" | |
echo "Valid comments needs to have refs #issueID 'refs # ID of Redmine ticket'" | |
exit 1 |
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 | |
apt-get --yes --force-yes remove --purge mysql* | |
apt-get --yes --force-yes purge mysql* | |
apt-get --yes --force-yes autoremove | |
apt-get --yes --force-yes autoclean | |
apt-get --yes --force-yes remove dbconfig-mysql | |
rm -rf /etc/mysql | |
rm -rf /var/lib/mysql | |
apt-get --yes --force-yes install mysql-server |
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 | |
apt install python python2-dev default-libmysqlclient-dev build-essential | |
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py | |
python2 get-pip.py | |
wget https://raw.githubusercontent.com/paulfitz/mysql-connector-c/master/include/my_config.h -O /usr/include/mysql/my_config.h | |
pip2 install MySQL-python | |
echo 'Installing Redmine SVN Auth (considering mod_dav is already installed' | |
pip2 install redmine-auth | |
apt install libapache2-mod-wsgi |
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
<html> | |
<head> | |
<title><?php echo($_SERVER['HTTP_HOST']);?></title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.min.js"></script> <!-- optional --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/geopattern/1.2.3/js/geopattern.min.js"></script> | |
<style type="text/css"> | |
html, body { | |
height: 100%; | |
} | |
body { |
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/sh | |
doms=`virtualmin list-domains --with-feature ssl --name-only` | |
for dom in $doms; do | |
virtualmin generate-letsencrypt-cert --domain $dom --renew 2 --web --default-hosts | |
done |