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/sh | |
# Must run as root. | |
echo "Stopping firewall and allowing everyone..." | |
iptables -F | |
iptables -X | |
iptables -t nat -F | |
iptables -t nat -X | |
iptables -t mangle -F | |
iptables -t mangle -X | |
iptables -P INPUT ACCEPT |
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 | |
E_BADARGS=65 | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 {old_branch_name} {new_branch_name}" | |
exit $E_BADARGS | |
fi | |
old_branch="$1" | |
new_branch="$2" |
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 | |
origBranch=$(git rev-parse --abbrev-ref HEAD) | |
delBranch="$1" | |
E_BADARGS=65 | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 {branch_name}" | |
exit $E_BADARGS | |
fi |
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 | |
origBranch=$(git rev-parse --abbrev-ref HEAD) | |
upstreamBranch="$origBranch" | |
E_BADARGS=65 | |
if [ $# -ne 2 -o $# -ne 1 ]; then | |
echo "Usage: $0 {new_origin} [{upstreamBranch}]" | |
exit $E_BADARGS | |
elif [ "x$2" != "x" ]; then | |
upstreamBranch="$2" |
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 | |
# | |
# While working with webapps I found myself creating the database credentials | |
# as well as the databases over and over. For me the username to connect to | |
# database was always same as the database name, almost always. So I created | |
# the following script to help me quickly setup the credentials | |
# | |
# Ways you can use it: | |
# $0 secret | |
# In this case database's name, user's name and password |
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 | |
# | |
# 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 |
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 | |
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 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 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 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 |