I hereby claim:
- I am metalrufflez on github.
- I am caiocorrea (https://keybase.io/caiocorrea) on keybase.
- I have a public key whose fingerprint is 1508 220E 626F 81C3 E688 E06B 78A1 17C5 BD0A 8EB4
To claim this, I am signing this object:
function count_conns() { | |
if [[ $# -eq 0 ]]; then | |
echo "Usage: $FUNCNAME <port>" | |
return | |
fi | |
ss -t -n "src :$1" | awk '{print $5}' | sed 1d | sort | cut -d: -f1 | uniq -c | sort -k1,1nr -t. -k2,2n -k3,3n -k4,4n -k5,5n | |
} |
I hereby claim:
To claim this, I am signing this object:
include: | |
- salt.mysql | |
{% for db, db_details in pillar.get('db_config', {}).items() %} | |
{{ db }}_database: | |
mysql_database.present: | |
- name: {{ db }} | |
{% for user, user_details in db_details['users'].items() %} | |
{{ user }}_user_in_{{ db }}: |
#!/bin/bash | |
export ORACLE_HOME="/path/to/oracle/home" | |
export ORACLE_SID=SID | |
DB_BKPDIR="/path/to/backup/dir" | |
#EXPORT DA BASE DE DADOS | |
echo "Dumping Database" | |
#${ORACLE_HOME}/bin/exp \"/ as sysdba\" file=$DB_BKPDIR/bkp_hourly.dmp log=$DB_BKPDIR/bkp_hourly.log buffer=3000000 compress=y full=y |
#!/bin/bash | |
export ORACLE_HOME="/path/to/oracle/home" | |
export ORACLE_SID=SID | |
DB_BKPDIR="/path/to/backup/directory" | |
DMPFILE="bkp_$(date +%y%m%d).dmp" | |
TARFILE="bkp_$(date +%y%m%d).tar.bz2" | |
LOGFILE="bkp_$(date +%y%m%d).log" |
#!/bin/bash | |
URL='http://www.dhl.com/content/g0/en/express/tracking.shtml?brand=DHL&AWB=<INSERT_TRACKING_CODE_HERE>%0D%0A' | |
BULK="$(curl -s "$URL" | egrep -A1 -m1 '<td class=".*" style="width: 5% ;text-align:left">.+</td>' | egrep -o '>.+<' | sed 's/[><]//g')" | |
CODE="$(echo $BULK | cut -d " " -f1)" | |
CTLFILE=/root/ctlfile | |
if [ "$CODE" -ne "$(cat $CTLFILE)" ]; then | |
echo $CODE > $CTLFILE | |
mail -s "DHL Update" <INSERT_YOUR_EMAIL_HERE> < <(echo $BULK) |
#!/bin/bash | |
# Uncomment the lines below to print the commands instead of executing them | |
# DEBUG refers to exporting from external dom0 | |
# DEBUG2 refers to importing the vm to local dom0 | |
#DEBUG="echo" | |
#DEBUG2="echo" | |
# You HAVE to inform at lease vm and host or else, usage in your face | |
if [ "$#" -lt 2 ]; then |
#!/bin/bash | |
FILE_DIR="/path/to/dir/" | |
DATE_TARGET=$(date +"%Y%m%d" --date='2 days ago') | |
for FILE_NAME in $(ls $FILE_DIR/*.log) | |
do | |
FILE_DATE=$(echo $FILE_NAME | cut -d"-" -f2 | cut -d"." -f1) | |
if [ "$FILE_DATE" -le "$DATE_TARGET" ]; then | |
rm -f $FILE_NAME |
#!/bin/bash | |
export ORACLE_HOME="/path/to/oracle/home" | |
export ORACLE_SID=SID | |
DB_BKPDIR="/path/to/backup/directory" | |
#EXPORT DA BASE DE DADOS | |
echo "Dumping Database" | |
${ORACLE_HOME}/bin/exp \"/ as sysdba\" file=$DB_BKPDIR/bkp_hourly.dmp log=$DB_BKPDIR/bkp_hourly.log buffer=3000000 compress=y full=y |
#!/bin/bash | |
# zmparseusers | |
# Create a formatted list to be used with zmcreateusers | |
# AUTHOR: Caio Correa | |
# Provided a file with a list of names like | |
# | |
# John Doe | |
# Lucy Doe |