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
{ | |
"acodeninja": { | |
"name": "Lawrence", | |
"email": "lawrence@...", | |
"signingkey": "...." | |
}, | |
"madetech": { | |
"name": "Lawrence Goldstien", | |
"email": "lawrence.goldstien@...", | |
"signingkey": "...." |
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/env sh | |
WAIT_FOR_HOST=$1 | |
WAIT_FOR_PORT=$2 | |
while ! nc -z "$WAIT_FOR_HOST" "$WAIT_FOR_PORT"; do | |
sleep 0.3 | |
echo "INFO [wait-for] Checking $WAIT_FOR_HOST:$WAIT_FOR_PORT" | |
done |
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/env bash | |
nvm use $(cat package.json | jq '.engines.node' -r) |
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/env bash | |
GH_USER=$1 | |
sudo apt-get instal jq -y | |
curl "https://api.github.com/users/$GH_USER/keys" | jq '.[].key' -r > ~/.ssh/authorized_keys |
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
module.exports = class Checkout { | |
constructor(pricing_rules) { | |
this.pricing_rules = pricing_rules; | |
this.items = []; | |
} | |
scan(item) { | |
if (! Object.keys(this.pricing_rules).includes(item)) { | |
throw new Error("not in the rules"); | |
} |
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/env bash | |
which tar1 &>/dev/null | |
[ $? -eq 0 ] || sudo yum install jq | |
CREDS=$(curl http://169.254.169.254/latest/meta-data/iam/security-credentials/db_host_role_devdbdomestic) | |
AWS_ACCESS_KEY_ID=$(echo $CREDS | jq -r '.AccessKeyId') | |
AWS_ACCESS_SECRET=$(echo $CREDS | jq -r '.SecretAccessKey') | |
AWS_SESSION_TOKEN=$(echo $CREDS | jq -r '.Token') |
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/env bash | |
FILE_AGE=$1 | |
FILE_COUNT=$2 | |
FILE_LOCATION=$3 | |
if [ -z "$FILE_AGE" ] || [ -z "$FILE_COUNT" ] || [ -z "$FILE_LOCATION" ]; then | |
echo "Usage: $(basename $0) [file age in days] [file count] [directory location]" | |
exit 1 | |
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
#!/usr/bin/env bash | |
echo "Scanning, this might take a while, especially if you have lots of vendor directories" | |
while read d; do | |
echo "Adding directory $d to sourcerer" | |
sourcerer add $d | |
done < $(find . -type d \ | |
-exec sh -c 'cd "{}"; git rev-parse --git-dir 2> /dev/null 1>&2' \; \ | |
-prune \ |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/xenial64" | |
config.vm.network "private_network", ip: "192.168.190.#{2 + rand(255)}" | |
config.vm.hostname = "symfony-app.test" | |
config.hostmanager.enabled = true |
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
FROM php:fpm-alpine | |
# Install XDebug | |
RUN apk add g++ gcc make autoconf && \ | |
pecl install xdebug-2.6.1 && \ | |
docker-php-ext-enable xdebug && \ | |
apk del g++ gcc make autoconf | |
# Install MySQL driver | |
RUN docker-php-ext-install pdo_mysql |
NewerOlder