Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block anandsunderraman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
anandsunderraman / troubleshootingSSLTrustStoreCommands.txt
Last active Oct 9, 2019
Troubleshooting trust store issues and ssl
View troubleshootingSSLTrustStoreCommands.txt
#inspects what is present in the truststore
keytool -list -v -keystore <truststorefile>
#gets certificate of a host via command line
openssl s_client -connect <host>:<port> | tee <cert-contents>
#import certificate into trust store
keytool -import -alias <alias> -file <cert-to-import> -storetype JKS -keystore <truststorefile>
View arrayToCSV.js
//function to print CSV from an array for robomongo
//place this in .robomongorc.js which should be present in your home directory
//inspired by
function toCSV(array) {
let deliminator = ',';
let textQualifier = '\"';
let headers = [];
var data = {};
var count = -1;
anandsunderraman / mapping.txt
Created Apr 19, 2019
Request Body Mapping for AWS API Gateway for form url encoded
View mapping.txt
#set($inputRoot = $input.path('$'))
#set($tokens = $inputRoot.split('&'))
anandsunderraman /
Created Dec 11, 2018
Apache Active MQ Local Setup

Apache ActiveMQ Local Setup for MaC


brew install apache-activemq


Modify the the activemq.xml located at /usr/local/Cellar/activemq/5.15.8/libexec/conf (general installation location) to have the following xml snippet

This will enable us to access the activemq use the JMXToolBox

anandsunderraman / mongoQuery.js
Last active Nov 19, 2018
Mongo db multiple groupBy
View mongoQuery.js
//given a set of documents
var db = [
"store": {
"storeId": "1",
"storeName: "A"
"audit": {
"createdBy": "ME"
anandsunderraman /
Created Jun 6, 2018 — forked from staltz/
The introduction to Reactive Programming you've been missing
anandsunderraman /
Created Mar 2, 2018 — forked from subfuzion/
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

anandsunderraman / promisedRequest.js
Last active Oct 19, 2016
Node.js request with Q promises
View promisedRequest.js
//import the http library
var http = require('http'),
//npm install q before requiring it
Q = require('q');
//a js object with options
var googleNewsOptions = {
hostname: '',
path: '/ajax/services/search/news?v=1.0&q=nodejs',
method: 'GET'
anandsunderraman / regex
Created Oct 3, 2014
Regex to replace commas between double quotes
View regex
View setPostParams.groovy
//set sessionToken with jwt token to post request
You can’t perform that action at this time.