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/env bash | |
| SOURCE=/some/dir | |
| DEST=/some/other/dir | |
| rsync \ | |
| --verbose \ | |
| --archive \ | |
| --prune-empty-dirs \ | |
| --dry-run \ | |
| --include='*.js' \ | |
| --filter='-! */' \ |
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 | |
| const DB_HOST = 'localhost'; | |
| const DB_NAME = 'php_bug_test'; | |
| const DB_TABLE = 'timestamp_test'; | |
| const DB_USER = 'root'; | |
| const DB_PASSWORD = 'root'; | |
| $dbSQL = "CREATE DATABASE IF NOT EXISTS ".DB_NAME; | |
| $combo = DB_NAME.'.'.DB_TABLE; |
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
| /** | |
| * perform multiple curl requests in parallel | |
| * @param array.<string> $urls - an indexed array of urls to fetch | |
| * @param array.<integer> $curopts - curl options to pass to curl_setopt_array() | |
| * @return array | |
| */ | |
| function curlMulti(array $urls, array $curlopts) | |
| { | |
| $ret = []; | |
| $chs = []; |
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 [ "$UID" -ne 0 ]; then | |
| echo "This script must be run as root" 1>&2 | |
| exit 1 | |
| fi | |
| ############################################################################# | |
| # Install Packages ########################################################## |
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 | |
| GOOG_LIB_DIR=/usr/lib/google/closure | |
| TMP_DIR=/tmp/update-google-closure-tools | |
| if [ "$UID" -ne 0 ]; then | |
| echo "This script must be run as root" 1>&2 | |
| exit 1 | |
| fi |
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 | |
| FPM_CONF=/etc/init/php5-fpm.conf | |
| if [ "$UID" -ne 0 ]; then | |
| echo "This script must be run as root" 1>&2 | |
| exit 1 | |
| fi | |
| if [[ $(grep -E '^umask [[:digit:]]{4}' "$FPM_CONF") ]]; 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 | |
| CWD=$(pwd) | |
| TMP_DIR=/tmp/install-imagemagick | |
| if [ "$UID" -ne 0 ]; then | |
| echo "This script must be run as root" 1>&2 | |
| exit 1 | |
| fi | |
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 | |
| dir=$1 | |
| user=$2 | |
| err=() | |
| if [ "$UID" -ne 0 ]; then | |
| err+=("this script must be run as root") | |
| fi |
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 [[ -z "$1" ]]; then | |
| echo "provide a path to the source gif file" | |
| exit 1 | |
| elif [ ! -f "$1" ]; then | |
| echo "the provided path is not a file" | |
| exit 1 | |
| fi |
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/env php | |
| <?php | |
| list($dir, $isDump) = DirHasher::getArgs($argv); | |
| $hasher = new DirHasher($dir); | |
| if ($isDump) { | |
| echo $hasher->getHashes()."\n"; | |
| } else { | |
| echo $hasher->getHash()."\n"; |
OlderNewer