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 | |
| verbose_mode=0 # Set this to 1 or 0 to enable/disable outputting all log messages. Enabling this causes some known issues with rsync output. keep it disabled. | |
| ip_check_url='http://myip.dnsomatic.com/' #URL that would show our current ip. This url should only show IP and nothing else, no other content, no html tags, etc... | |
| home_network_ip='1.1.1.1' #External IP that we should be on for the backup to trigger | |
| curl_url='http://reportingserver.com/backup-report.php' #url that should get alerts for cron jobs | |
| signatures='1234567890' #random string to verify requests on curl_url script | |
| rsync_exclusive=1 #whether or not we should exit if there is already an rsync process running, values could be 1 or 0 | |
| rsync_additional_opts='--verbose' # any additional switches that we may want to add, an example could be --verbose | |
| backup_alert_period=10 #alert me if no backup has run after this many days |
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
| #!/usr/bin/python | |
| # My very first python script :) | |
| """ Pre-res: | |
| require python-sqlite | |
| """ | |
| """ Possible Improvments | |
| Support for long arguments switches | |
| """ |
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 | |
| $image1 = new imagick("image1.png"); | |
| $image2 = new imagick("image2.png"); | |
| $result = $image1->compareImages($image2, Imagick::METRIC_MEANSQUAREERROR); | |
| $result[0]->setImageFormat("png"); | |
| header("Content-Type: image/png"); | |
| echo $result[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
| #!/bin/bash | |
| TABLENAME=$1 | |
| DISABLE_CHARSETCHECK=$2 | |
| DRY_RUN=1 | |
| PROGRESS=100 | |
| RETRIES=3 | |
| RUN_TIME='5m' # could be 45m | |
| TRANSACTION_SIZE=1000 |
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 | |
| // instantiate GameOfLife and run it. | |
| $gol = new GameOfLife(); | |
| $gol->run(); | |
| /** | |
| * Class IOHelper | |
| * Some misc utility functions for dealing with I/O on CLI | |
| */ |
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 | |
| MDB="$1" | |
| KEYWORD="$2" | |
| # Detect paths | |
| MYSQL=$(which mysql) | |
| AWK=$(which awk) | |
| GREP=$(which grep) | |
| E_BADARGS=65 |
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 | |
| # | |
| # | |
| # Take dump of the configured database and transfer it to an offsite server | |
| # | |
| start_date=`date +M%m-D%d-Y%Y_%Hh%Mm%Ss` | |
| source_db_user="sourceDatabaseUserNameHere" | |
| source_db_password="sourceDatabaseUserPasswordHere" |
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
| #!/usr/bin/php | |
| <?php | |
| // Use https://uptimerobot.com/ instead | |
| define('CONTACT_TO', 'me@my.com'); | |
| define('CONTACT_FROM', 'report@my.com'); | |
| $message = ''; | |
| $subject = ''; | |
| if (count($argv) > 3) |
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 | |
| clear | |
| stty erase '^?' | |
| installSampleData=1 | |
| installExtensions=0 | |
| downloader="aria2c" | |
| baseDownloadUrl="http://www.magentocommerce.com/downloads/assets" | |
| magentoVersion="1.9.0.0" | |
| magentoName="magento-${magentoVersion}" |
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 | |
| # | |
| # Just a clumsy little cert helper I use oftenly | |
| # | |
| # | |
| E_BADARGS=65 | |
| if [ $# -lt 3 -o $# -gt 11 ]; then | |
| echo "Usage: $0 mode[=key|csr|crt] name keyLength[=4096] commonName organizationUnit organization locality state countryTwoLetterCode emailAddress days[=1900]" | |
| exit $E_BADARGS |