I hereby claim:
- I am cjlyth on github.
- I am cjlyth (https://keybase.io/cjlyth) on keybase.
- I have a public key whose fingerprint is 558D B27C D3F7 E078 DB84 46B0 4BFF 1A62 3465 7D7F
To claim this, I am signing this object:
#!/usr/bin/env bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
[[ -f "$DIR/colors.tput.sh" ]] && { | |
source "$DIR/colors.tput.sh" | |
} || { | |
echo "Unable to find file: $DIR/colors.tput.sh" | |
exit 1 | |
} | |
reset="$(color)" |
#!/usr/bin/env bash | |
yum update -y | |
yum groupinstall "Development Tools" -y | |
sudo -u ec2-user git config --global credential.helper '!aws codecommit credential-helper $@' | |
sudo -u ec2-user git config --global credential.UseHttpPath true | |
# Borrowed from https://forums.aws.amazon.com/thread.jspa?messageID=911050 | |
echo "Setting up NodeJS Environment" |
#!/usr/bin/env bash | |
# thanks to this gist for getting me started | |
# https://gist.github.com/noonat/9fc170ea0c6ddea69c58 | |
curl https://api.github.com/users/cjlyth/keys \ | |
| grep -oe 'ssh-rsa[^""]*' \ | |
>> ~/.ssh/authorized_keys | |
echo -e "#cloud-config\nssh_authorized_keys:\n$(sed 's/^/ - /' ~/.ssh/authorized_keys)" \ | |
> ~/cloud-config.yaml |
# http://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html#directory-layout | |
mkrole() | |
{ | |
dir_name=${1:-'common'} | |
mkdir -p roles/$dir_name/{tasks,handlers,templates,files,vars,defaults,meta} | |
touch roles/$dir_name/{tasks,handlers,vars,defaults,meta}/main.yml | |
} |
I hereby claim:
To claim this, I am signing this object:
mvn versions:set -DnewVersion=0.0.3-SNAPSHOT |
api.all('*', function(req, res, next){ | |
if (!req.get('Origin')) return next(); | |
// use "*" here to accept any origin | |
res.set('Access-Control-Allow-Origin', 'http://localhost:3000'); | |
res.set('Access-Control-Allow-Methods', 'GET, POST'); | |
res.set('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type'); | |
// res.set('Access-Control-Allow-Max-Age', 3600); | |
if ('OPTIONS' == req.method) return res.send(200); | |
next(); |
hash nvm 2>/dev/null | |
if [ "$?" == "1" ]; then | |
if [ -f "$HOME/.nvm/nvm.sh" ]; then | |
. $HOME/.nvm/nvm.sh | |
if [ -f "$HOME/.nvm/bash_completion" ]; then | |
. $HOME/.nvm/bash_completion | |
fi | |
fi | |
fi |
#!/usr/bin/gawk -f | |
BEGIN { | |
RS="(\"*[[:alnum:]*]\"[ \t]*:[ \t]*)?\"*[ \t]*(,|{)+[ \t]*|\n[ \t]+\"|(\"[[:alnum:]*]\"[ \t]*:[ \t]*)?{|\"+[\n]+"; | |
FS="\"[ \t]*:[ \t]*|\"?[ \t]*:[ \t]*\""; | |
column_format ="| %-39s"; | |
cols = 0; rows = 0; |
db.zz_an02_cache.find({an02cacheKey:"8-70273186-1465091679-1434033220871"},{outletId:-1}) | |
db.zz_an02_cache.aggregate( [ | |
{ $match: { an02cacheKey: "1884586746-2-96337202-1434032093666" } } | |
, { $group: { _id: "$outletId" } } | |
] ); | |
{ $group: { _id: "$state", totalPop: { $sum: "$pop" } } }, |