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 | |
if [ "$#" -ne 3 ]; then | |
echo "Scan a database for credit card numbers and social security numbers, outputting to an html file with the numbers highlighted in their database insert statements." | |
echo "Usage: sensitivescan.sh [db-server] [database] [output-html-filename]" | |
echo "Requires mysqldump, grep, and aha installed on the server." | |
exit | |
fi | |
echo "Scanning server $1 database $2 for sensitive information" | |
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 | |
# usage | |
# ./fix-pdf-s3.sh bucket path/to/folder/to/scan | |
# No trailing slash on the bucket or path | |
bucket=$1 | |
path=$2 | |
origin=$1 |
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
# This file is: ~/.ssh/config | |
# You may have other (non-CodeCommit) SSH credentials stored in this | |
# config file – in addition to the CodeCommit settings shown below. | |
# NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file! | |
# Credentials for Account1 | |
Host awscc-account1 # 'awscc-account1' is a name you pick | |
Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region |
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 | |
LOCK_FILE=/tmp/permission-repair-lock | |
if [ ! -e $LOCK_FILE ]; then | |
trap "rm -f $LOCK_FILE; exit" 0 1 2 3 15 | |
touch $LOCK_FILE | |
for d in /var/www/html/* | |
do |
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 | |
# | |
# supervisord Startup script for the Supervisor process control system | |
# | |
# Author: Mike McGrath <[email protected]> (based off yumupdatesd) | |
# Jason Koppe <[email protected]> adjusted to read sysconfig, | |
# use supervisord tools to start/stop, conditionally wait | |
# for child processes to shutdown, and startup later | |
# Erwan Queffelec <[email protected]> | |
# make script LSB-compliant |
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 | |
# Run this script on a regular basis to clean up permissions in all website projects. | |
# It makes sure all files are group-writable, and that the group is apache. | |
# The lock file prevents it from running on top of another process. | |
LOCK_FILE=/tmp/permission-repair-lock | |
if [ ! -e $LOCK_FILE ]; then | |
trap "rm -f $LOCK_FILE; exit" 0 1 2 3 15 |
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
var TextCountdown = { | |
Update: function(field, target_id) { | |
var maxlength = field.getAttribute('maxlength'); | |
var length = field.value.length; | |
var remaining = maxlength - length; | |
document.getElementById(target_id).innerHTML = remaining; | |
} | |
}; |
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
var PageChangeWarning = { | |
unload_message: "You have unsaved changes on this page.", | |
display_warning: function() { | |
return this.unload_message; | |
}, | |
change_made: function() { | |
window.onbeforeunload = this.display_warning.bind(this); | |
}, | |
saved: function() { | |
window.onbeforeunload = null; |
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
var FieldMultiplier = { | |
makeSum: function(e) { | |
/** | |
* Look for any elements with the same class as this one | |
* and sum them, multiplying by the multiplier attribute. | |
* The sum will go into the elements that match the sum attribute. | |
*/ | |
var sum = 0; | |
var sum_selector = '.'+e.getAttribute('class'); | |
var elements = document.querySelectorAll(sum_selector); |
NewerOlder