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 | |
cd /media/dumps | |
name=$(date +%b-%d) | |
year=$(date +%Y) | |
[ -d $year ] || mkdir $year || { echo "Could not create directory '$year'"; exit 1; } | |
mongodump --db t3_mage --out $name &> mongodump.log | |
if [ $? ]; then | |
tar -czf snapshots/$year/$name.tgz $name | |
if [ $(($(date +%d | sed 's/^0*//') % 10)) == 0 ]; then |
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 | |
# | |
# A simple function for starting an SSH tunnel (e.g. tunnlr.com) | |
# | |
# Add the function to your .bashrc file or use this script standalone | |
# Takes port to forward to as only parameter | |
function tunnlr(){ | |
[ -z $1 ] && { echo "You must specify a port to forward to."; return 1; } | |
if [ -f ~/.tunnlr ]; then |
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 | |
# | |
# Requires Python 2.7 64-bit | |
# Run using Git Bash program from "Git for Windows" | |
[ -d /c/Python27 ] || { | |
echo "Oops, I expected Python 2.7 to be installed at C:\Python27"; | |
exit 1; | |
} | |
cd /c/Python27/ |
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 | |
# | |
# Store/update the DNS entry locally. Requires unbound install as a local DNS resolver | |
# and a cron job that runs this script. | |
# | |
# Copyright: Colin Mollenhour 2014 | |
# | |
# Recommended DNS servers for querying: | |
# OpenDNS: 208.67.222.222 and 208.67.220.220 | |
# Google: 8.8.8.8 and 8.8.4.4 |
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 | |
# | |
# Copyright Colin Mollenhour 2014 | |
dir=/root/deadlocks | |
[ -d $dir ] || mkdir -p $dir | |
cd $dir || { echo "Could not cd to $dir"; exit 1; } | |
mysql -be 'show engine innodb status;' \ | |
| sed 's/\\n/\n/g' \ |
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 | |
DBNAME=mydb | |
SNAPSHOT_DAYS=2 | |
ARCHIVE_DAYS=0 | |
COMPRESS_INPLACE=1 | |
mysqldump='docker exec mysql_mysql_1 mysqldump' | |
gzip=/bin/gzip |
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 | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php |
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 | |
: <<=cut | |
=head1 NAME | |
nginx error log - Munin plugin to monitor nginx error_log rates (debug, info, notice, warn, error, crit, alert, emerg). | |
=head1 APPLICABLE SYSTEMS | |
Any Linux host, running nginx, with bash version > 4.0 |
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
/** | |
* Watch the spool, delay processing of emails from unrecognized domain names. | |
* | |
* Installation: | |
* npm install nedb | |
* npm install node-windows | |
* node server.js --install {spool_dir} | |
* net start SpamDelayer | |
* | |
* @Author Colin Mollenhour |