Skip to content

Instantly share code, notes, and snippets.


Abhishek Hingnikar darkyen

View GitHub Profile
darkyen / tsconfig.json
Created Dec 27, 2016
Problem, everything gets compiled, files not even required.
View tsconfig.json
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": false,
"sourceMap": true,
"alwaysStrict": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"jsx": "react"
View webtask.js
const Express = require('express');
const request = require('request-promise');
const Twitter = require('twit@2.2.3');
const Webtask = require('webtask-tools');
const jwt = require('jsonwebtoken');
const app = Express();
// A Much better approach which demonstrates API Auth is at
View gist:c29f07771d763602f5c6
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (process){
'use strict';
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _plivo = require('plivo');
var _plivo2 = _interopRequireDefault(_plivo);
View test.js
export function openChannel(channelId){
return new Promise((resolve, reject) => {
const newChannel = new PusherGameChannel(channelId);
newChannel.once('connect', resolve);
newChannel.once('error', reject);
export async function openChannelWithServer(channelId){
View Testrun.txt
C:\Users\abhis\Downloads>ab -n 1000 -c 100
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
Licensed to The Apache Software Foundation,
Benchmarking (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
View chrome-tcp-backend.js
import 'text-encoding';
import uuid from 'uuid';
// I am not really sure about this master luke.
const ChromeSocketServer = chrome.sockets.tcpServer;
const ChromeSocketClient = chrome.sockets.tcp;
const serverSocketListeners = {};
const clientSocketListeners = {};
const textEncoder = new TextEncoder();
darkyen / file.es6.js
Created Nov 19, 2015
Async fluxxy login using auth0 and es7 with localForage for storage.
View file.es6.js
const AUTH0_URI = 'YOUR_URI';
let lock = new Auth0Lock(AUTH0_TOKEN, AUTH0_URI);
import dispatcher from 'PATH_TO_DISPATCHER';
import localForage from 'localForage';
// Maybe you can drop this as its
// 2016 already !
import Promise from 'bluebird';
darkyen /
Last active Aug 29, 2015

##Disclaimer The following are my own personal views, and are solely based on my understanding, I do not wish to offend anyone, this is merely a thought experiment.

##Religion is worlds first open source product

In the programming world we have the concept of open source software, where somebody writes the original code and publishes the product, people use it, add features to it when they disagree on the future of the product the product is essentially branched and eventually becomes completely different the major example of this is the well known

darkyen / gist:120c46739985ebf3b39b
Created Jun 10, 2015
Ferengi Rules of Acquisition [Complete List*]
View gist:120c46739985ebf3b39b
1 "Once you have their money, you never give it back." "The Nagus" (DS9 episode)
2 "The best deal is the one that makes the most profit." The 34th Rule (DS9 novel)
3 "Never spend more for an acquisition than you have to." "The Maquis, Part II" (DS9 episode)
4 "A woman wearing clothes is like a man in the kitchen." The Ferengi Rules of Acquisition (DS9 novel)
5 "Always exaggerate your estimates." Cold Fusion (SCE novel)
6 "Never let family stand in the way of opportunity." "The Nagus" (DS9 episode)
7 "Always keep your ears open." "In the Hands of the Prophets" (DS9 episode)
8 "Small print leads to large risk." The Ferengi Rules of Acquisition (DS9 novel)
9 "Instinct, plus opportunity, equals profit." "The Storyteller" (DS9 episode)
10 "Greed is eternal." "Prophet Motive" (VOY episode)
View browserify.js
gulp.task('browserify', function(callback){
function createBundle(b_config){
var bundler = browserify(b_config.entry, {
debug: true
var bundle = function(){