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
const a = (n, timeout) => | |
() => | |
new Promise((resolve, reject) => { | |
setTimeout( | |
() => { | |
console.log(n) | |
resolve(n) | |
}, | |
timeout) | |
}) |
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
console.log('Loading function'); | |
const https = require('https'); | |
const url = require('url'); | |
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
const slack_url = 'https://hooks.slack.com/services/...'; | |
const slack_req_opts = url.parse(slack_url); | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = {'Content-Type': 'application/json'}; |
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 | |
branch=`git branch | grep '^\*' | cut -d ' ' -f 2` | |
merge_branch=${GITHUB_DEFAULT_BRANCH:-master} | |
git checkout $merge_branch && git pull && git branch -d $branch | |
git branch |
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 | |
### BEGIN INIT INFO | |
# Provides: circusd | |
# Required-Start: $remote_fs $network | |
# Required-Stop: $remote_fs $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: circus master control daemon | |
# Description: This is a daemon that controls the circus minions |
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
INFO : service[circusd] running will change from 'false' to 'true' | |
DEBUG : service[circusd] enabled will not change (current value is 'true') | |
DEBUG : Executing `service circusd start`... | |
DEBUG : exited with 0 | |
DEBUG : stdout | Starting circusd daemon: /usr/lib64/python2.7/dist-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability. | |
DEBUG : stdout | _warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning) | |
DEBUG : stdout | [60G[[0;32m OK [0;39m] | |
DEBUG : This resource is updated. |
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 | |
if [ $# -lt 1 ] | |
then | |
echo 'Usage: c INSTANCE_NAME [REMOTE_COMMANDS...]' | |
exit 1 | |
fi | |
pdns=`aws ec2 describe-instances --filters "Name=tag:Name,Values=$1" | jq -r '.Reservations[].Instances[].PrivateDnsName'` |
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 | |
# for fig's bug (https://github.com/docker/fig/issues/553#ref-pullrequest-46182758) | |
export HOME=/root | |
cd /root && /usr/local/bin/fig start 2>&1 | logger |
NewerOlder