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
console.log('node 01 and node 02'); | |
console.log('latency summary of each transaction type including message direction IN/ OUT'); | |
var file = 'file_path'; | |
function qtile (leaves, ptile) { | |
return d3.quantile(leaves.map(function(d) { return +d.latency }).sort(), ptile); | |
} | |
function report(file) { |
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
-- setup a new repository | |
echo "# mygo" >> README.md | |
git init | |
git add README.md | |
git commit -m "first commit" | |
git remote add origin https://github.com/smarigowda/mygo.git | |
git push -u origin master |
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
//nice way to populate object with route and hanldler | |
route = { | |
routes: {}, | |
for: function(path, handler) { | |
this.routes[path] = handler; | |
} | |
} |
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
-- Generic uncaught exception handler | |
process.on('uncaughtException', function(err) { | |
console.error(err.stack); | |
}); | |
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
ctrl + u -- clear command line | |
ctrl + y -- recall cleared line | |
ctrl + w -- clear the previous word | |
curl -k https://localhost:443/.... -- turn off ssl certification | |
curl -v -k https://... -- response headers | |
curl -v -k -X POST http://localhost:3000 | |
curl -v -k -X DELETE -b skySSO=00-058bd7d38838... -- sending cookie | |
-- using xargs |
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
// ------------------------------------------------------------------------------------------------------ | |
// find previous message | |
// ------------------------------------------------------------------------------------------------------ | |
function findPriorMessage() { | |
var priorMessage = $context.currentItem.previousItem; | |
for (;;) { | |
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
<div ng-app="wizardApp"> | |
<div ng-controller="WizardSignupController"> | |
<h2>Signup wizard</h2> | |
<div ui-view></div> | |
</div> | |
</div> | |
<script type="text/javascript" src="/js/vendor/angular-ui-router/release/angular-ui-router.min.js"></script> | |
<script type="text/javascript"> | |
angular.module('wizardApp', [ | |
'ui.router', |
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
angular.module('d3', []) | |
.factory('d3Service', ['$document', '$window', '$q', '$rootScope', | |
function($document, $window, $q, $rootScope) { | |
var d = $q.defer(), | |
d3service = { | |
d3: function() { return d.promise; } | |
}; | |
function onScriptLoad() { | |
// Load client in the browser | |
$rootScope.$apply(function() { d.resolve($window.d3); }); |
NewerOlder