I hereby claim:
- I am sturadnidge on github.
- I am stu (https://keybase.io/stu) on keybase.
- I have a public key whose fingerprint is D119 6CCC 1CA6 35C7 ADA2 FB55 1528 858E 6E7D 4E0B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| 'use strict'; | |
| // npm install cheerio moment optimist | |
| var http = require('http'), | |
| cheerio = require('cheerio'), | |
| moment = require('moment'), | |
| argv = require('optimist') | |
| .usage('\nCheck csgolounge match stats every 30 secs.\n\nUsage: $0') | |
| .demand(['d', 'i', 'm']) |
| 'use strict'; | |
| // npm install colors moment optimist | |
| // builtins | |
| var http = require('http'), | |
| // 3rd party | |
| colors = require('colors/safe'), | |
| moment = require('moment'); |
| // nice one paul irish + friends | |
| // http://www.paulirish.com/2009/random-hex-color-code-snippets/ | |
| function hexGen() { | |
| return Math.floor(Math.random()*16777215).toString(16) | |
| } |
| function uuidGen() { | |
| var uuid = 'xxxxxxxxxxxxyxxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, | |
| function(c) { | |
| var r = Math.random() * 16 | 0, | |
| v = c == 'x' ? r : (r & 0x3 | 0x8); | |
| return v.toString(16); | |
| }); | |
| return uuid; | |
| } |
| 'use strict'; | |
| // npm install cheerio colors moment optimist | |
| // builtins | |
| var http = require('http'), | |
| // 3rd party | |
| cheerio = require('cheerio'), | |
| colors = require('colors/safe'), | |
| moment = require('moment'), |
| 'use strict'; | |
| /*jshint node:true */ | |
| // npm install lodash colors minimist request sync-request | |
| var _ = require('lodash'), | |
| colours = require('colors/safe'), | |
| parseArgs = require('minimist'), | |
| request = require('request'), | |
| requestSync = require('sync-request'), |
To generate a self-signed cert, do the following:
openssl req -config 12factor.req -new -nodes -x509 -newkey rsa:2048 -sha256 -keyout 12factor.key -out 12factor.cert -days 3650
Where 12factor.req is:
[ req ]
default_bits = 2048
default_keyfile = 12factor.key
| wget -O "<filename>" --header="Authorization: Token ${PIVNET_TOKEN}" file/to/download |
| #!/bin/bash | |
| # uaac is an alias set in .profile of ops manager user | |
| shopt -s expand_aliases | |
| source ~/.profile | |
| function usage { | |
| printf "Usage: ${0##*/} <file-to-upload.pivotal>\n" | |
| exit 1 | |
| } |