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:
| 'use strict'; | |
| var db, | |
| MongoClient = require('mongodb').MongoClient; | |
| var database_name = checkExists(process.env.MONGODB_DATABASE) ? process.env.MONGODB_DATABASE : 'test', | |
| env_user = process.env.MONGODB_USER, | |
| env_pass = process.env.MONGODB_PASSWORD, | |
| env_host = checkExists(process.env.MONGODB_HOST) ? process.env.MONGODB_HOST : 'localhost', | |
| env_port = checkExists(process.env.MONGODB_PORT) ? parseInt(process.env.MONGODB_PORT, 10) : 27017; |
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']) |
| // 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'), |
| { | |
| "brand": "joyent", | |
| "dataset_uuid": "templates/smartos64", | |
| "max_physical_memory": 1024, | |
| "nics": [ | |
| { | |
| "nic_tag": "admin", | |
| "ip": "dhcp" | |
| } | |
| ] |
| var rl = require('readline'); | |
| var fs = require('fs'); | |
| var i = rl.createInterface(process.stdin, process.stdout, null); | |
| i.question("Enter the UUID to correct: ", function(answer) { | |
| var uuidArray = answer.split("-"); | |
| // only the first half of the UUID is wrong, so iterate |
| .encoding = "UTF-8" | |
| config.version = "8" | |
| virtualHW.version = "4" | |
| numvcpus = "2" | |
| memsize = "2048" | |
| ide0:0.present = "TRUE" | |
| ide0:0.fileName = "ide.vmdk" | |
| ethernet0.present = "TRUE" | |
| ethernet0.virtualDev = "e1000" | |
| svga.autodetect = "FALSE" |
| { | |
| "brand": "joyent", | |
| "dataset_uuid": "e8c41d40-f161-11e1-b839-a3631c115653", | |
| "max_physical_memory": 1024, | |
| "nics": [ | |
| { | |
| "nic_tag": "admin", | |
| "ip": "dhcp", | |
| "gateway": "192.168.0.254" | |
| } |