This file contains hidden or 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
var until = new Date(2015,1,1); | |
var since = new Date(2010,1,1); | |
var digestor = '535b97507899a672c49dd490' | |
db.logs.aggregate([ | |
{ | |
$match: { | |
time: { | |
$gt: 0 | |
}, |
This file contains hidden or 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
$scope.percentiles = metrics.map(function(metric, index) { | |
return {_id: metric._id, percentiles: (function(arr) { | |
function getPercentile(percentile, array) { | |
var index = percentile * arr.length; | |
var nearest = Math.floor(index); | |
if(index % 1 === 0) { | |
return (array[nearest-1] + array[nearest]) / 2; | |
} else { | |
return array[nearest]; | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
encrypt() { | |
PUBLIC_KEY="~/.ssh/id_rsa" | |
echo $1 | openssl rsautl -encrypt -inkey <(openssl rsa -in ~/.ssh/id_rsa -outform pem 2> /dev/null | openssl rsa -pubout 2> /dev/null) -pubin | openssl base64 | |
} | |
decrypt() { | |
PUBLIC_KEY="~/.ssh/id_rsa" | |
echo "$1" | openssl base64 -d | openssl rsautl -decrypt -inkey <(openssl rsa -in ~/.ssh/id_rsa -outform pem 2> /dev/null) | |
} | |
NOOK=$(encrypt "Hello world") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
[ | |
{ | |
"avatar": "http://www.iconpng.com/png/windows8_icons2/biohazard.png", | |
"name": "bot cutwail", | |
"uname": "@cutwail", | |
"followers": "51904740", | |
"following": "134", | |
"tweets": "5456" | |
}, | |
{ |
This file contains hidden or 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
{ | |
"query":{ | |
"count":41, | |
"created":"2013/12/02T13:09:27Z", | |
"lang":"en-US", | |
"results":{ | |
"quote":[ | |
{ | |
"date":"2013/11/29", | |
"Date":"2013/11/29", |