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
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 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 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 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 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 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
# prerequisites | |
# ubuntu + docker + docker-machine + digital ocean cloud | |
-- create a docker host for jmeter-server | |
JMETER_SERVER_ID=1 | |
docker-machine create --driver digitalocean --digitalocean-access-token $DOTOKEN jmeter-server${JMETER_SERVER_ID} | |
-- create a docker host for jmeter-client | |
docker-machine create \ | |
--driver digitalocean \ |
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
-- run only once for each thread | |
if( ${__counter(TRUE)} == 1 ){ | |
print("MyPrint :: This is run once per thread" ); | |
} | |
-- if condition can take a variable | |
-- ex ${any_variable} | |
-- JSR223 Post Processor | |
-- user of vars.get and prev |
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
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); }); |
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
<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 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
-- Docker machine commands | |
docker-machine | |
docker-machine ls | |
docker-machine -v | |
docker-machine env | |
docker-machine env staging | |
$(docker-machine env staging) -- sets the environment variables | |
or | |
eval "$(docker-machine env staging)" -- load the Machine configuration into your shell |
OlderNewer