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
#!/usr/bin/env node | |
const fs = require('fs'); | |
const bumpVersion = process.argv.length >= 3 ? process.argv[2] : undefined; | |
['./package.json', './package-lock.json'].forEach(fname => { | |
let packageJson = fs.readFileSync(fname, 'utf8'); | |
const [full, semver] = packageJson.match('"version":[ ]*"([0-9]+\.[0-9]+\.[0-9]+)"'); | |
let [major, minor, patch] = semver.split('.').map(version => parseInt(version)); |
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
v6.9.2 | |
3.10.9 | |
svc-qa@1.0.0 /Users/colbyblair/code/communityco/svc-qa | |
├─┬ @communityco/config@2.0.1 | |
│ └─┬ nconf@0.8.4 | |
│ ├── async@1.5.2 | |
│ ├── ini@1.3.4 | |
│ ├── secure-keys@1.0.0 | |
│ └─┬ yargs@3.32.0 | |
│ ├── camelcase@2.1.1 |
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
'use strict'; | |
/** Function to flatten sub-arrays within an array into one big array. | |
* @param {Array} origArray - The array to flatten. | |
* | |
* @returns {Array} The flattened array. | |
*/ | |
function flatten(origArray) { | |
var flattenedArray = []; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/prototype/1/prototype.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1/scriptaculous.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> |
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
#!/usr/bin/env python2.7 | |
import random | |
import numpy | |
def gen_random_string(range_start, range_end, str_len): | |
#~.145 s | |
return "".join( | |
[ | |
"x%04x" %\ |