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 | |
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) |
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 | |
# 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 |
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_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 |
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 | |
export ORACLE_HOME="/path/to/oracle/home" | |
export ORACLE_SID=SID | |
DB_BKPDIR="/path/to/backup/directory" | |
DMPNAME="bkp_$(date +%y%m%d).dmp" | |
TARNAME="bkp_$(date +%y%m%d).tar.bz2" | |
LOGNAME="bkp_$(date +%y%m%d).log" |
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 | |
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 |
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 | |
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" |
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 | |
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 |
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 | |
# zmcreateusers | |
# Mass create zimbra accounts | |
# | |
# AUTHORS: Caio Corrêa, Thompson Alves | |
# LAST UPDATED: 2011/12/02 | |
# | |
# Version 1.2: Added the report at the ending | |
# Version 1.1: Added security check of alias and 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 | |
# 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 |
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 | |
PHOTODIR="~/Pictures/AutoPhotos" | |
/usr/sbin/screencapture -x -t jpg $PHOTODIR/$(date +%Y%m%d-%H%M)s.jpg | |
# The isightcapture does not comes with OSX, so you'll have to download it somewhere | |
# The developer took down it's site and I couldn't find it anywhere | |
/usr/local/bin/isightcapture $PHOTODIR/$(date +%Y%m%d-%H%M)p.jpg |
OlderNewer