export DRONE_SERVER=http://buildme.com
export DRONE_TOKEN=specialtoken
drone secret add --image=plugins/downstream
octocat/hello-world DOWNSTREAM_TOKEN my-secret-token
# cool way to increment a value in a dict | |
some_dict[aKey] = some_dict.get(aKey, 0) + 1 |
# React webpack and sass | |
# depends on: npm babel webpack weback-dev-server -g | |
npm init | |
npm install react react-dom --save | |
npm install babel-loader babel-core babel-preset-es2015 babel-preset-react | |
# for a simple project make a directory structure like so | |
touch index.html App.js main.js webpack.config.js | |
## webpack.config.js using sass loader |
export DRONE_SERVER=http://buildme.com
export DRONE_TOKEN=specialtoken
drone secret add --image=plugins/downstream
octocat/hello-world DOWNSTREAM_TOKEN my-secret-token
Note: In automated pipelines, you may need to run the following command for your Git repository prior to calling terragrunt to ensure that the ssh host is registered locally, e.g.: | |
$ ssh -T -oStrictHostKeyChecking=no git@github.com || true |
const https = require('https'); | |
const fs = require('fs'); | |
const options = { | |
key: fs.readFileSync('privkey.pem'), | |
cert: fs.readFileSync('cert.pem'), | |
ca: fs.readFileSync('fullchain.pem'), | |
requestCert: true, | |
} |
exports.createHandler = function (method) { | |
return new Handler(method); | |
} | |
Handler = function(method) { | |
this.process = function(req, res) { | |
params = null; | |
return method.apply(this, [req, res, params]); | |
} | |
} |
brew info somedanktool
brew switch somedanktool 1.6.9
# filter amis on region and name | |
aws ec2 describe-images --region us-west-2 --filters "Name=name,Values=rancheros-v1.1*" "Name=virtualization-type,Values=hvm" --query 'Images[*].Name' | |
# create key-pair and save to file | |
aws ec2 create-key-pair --key-name dummy --query "KeyMaterial" > dummy.pem |