Skip to content

Instantly share code, notes, and snippets.

View devendrasr's full-sized avatar
💭
building DataOS®

Devendra Singh devendrasr

💭
building DataOS®
View GitHub Profile
@devendrasr
devendrasr / HelloWorld.java
Created October 18, 2016 07:32 — forked from lolzballs/HelloWorld.java
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
instantiateHelloWorldMainClassAndRun();
@devendrasr
devendrasr / stuns
Created August 7, 2016 17:08 — forked from yetithefoot/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@devendrasr
devendrasr / econnreset-fix-with-request-module
Created April 13, 2016 07:11
Fixed the econnreset issue for the request module while calling google snap to road api
var key = 'YOUR-KEY';
//Setting maxSockets to fix econnreset issue
var separateReqPool = {maxSockets: 9999999};
var url = 'https://roads.googleapis.com/v1/snapToRoads?key='+key+'&interpolate=true&path=' + trackString;
request.get({
url: url, json: true, pool: separateReqPool
}, function (err, r, b) {
console.log(err, b);
});
@devendrasr
devendrasr / econnreset-fix
Last active August 18, 2016 12:25
Solution to econnreset while using a http client for google snap to road api
var https = require('https');
//Setting max sockets did the thing for me
https.globalAgent.maxSockets = 99999999999;
https.request.timeout = 60000;
var options = { //setting options..host,port,path etc..
host: 'roads.googleapis.com',
//timeout: 60000,
port: 443,
path: '/v1/snapToRoads?path=' + trackString + '&interpolate=true&key=' + key,