Skip to content

Instantly share code, notes, and snippets.

View rootshell2's full-sized avatar

Alfredo Tomio Junior rootshell2

  • Amsterdam - NL
View GitHub Profile
#!/bin/bash
sudo mount -o remount,size=10G,noatime /tmp
echo "Done. Please use 'df -h' to make sure folder size is increased."
@rootshell2
rootshell2 / send-email-from-cli
Created March 17, 2017 21:13
Send e-mail from server using smtp-cli — command line SMTP client
# Send e-mail from server using smtp-cli — command line SMTP client
# http://www.logix.cz/michal/devel/smtp-cli/
#
# Original version by Alfredo Tomio Junior
# <alfredo.tomio@neoway.com.br>
SMTPCLI="/usr/bin/smtp-cli"
KEYSMTP="your aws key smtp"
SECRETKEYSMTP="your aws secret key smtp"
MAILFROM="Alfredo Tomio Junior<email@gmail.com>"
@rootshell2
rootshell2 / function-slacknotice
Last active March 17, 2017 20:59
Incoming Webhooks. Send data into Slack in real-time
function slacknotice ()
{
SLACKMSG=`cat $LOGDIR/$PROCESSLOG`
$CURLCMD -X POST --data-urlencode 'payload={"text": "'"<!channel> $SLACKMSG"'" }' https://hooks.slack.com/services/[ create your own hook ]
}
@rootshell2
rootshell2 / client.conf
Created March 17, 2017 20:50
Securely Connect your AWS VPC and Azure VNET environments with a OpenVPN tunnel.
# client.conf at AWS side
# Original version by Alfredo Tomio Junior
# <rootshell2@gmail.com>
remote [IP] [PORT]
dev tun
proto udp
ifconfig 10.10.0.2 10.10.0.1
comp-lzo
persist-key