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
function Tokenize(str){ | |
// something to keep track of parens nesting | |
var current = {}; | |
if(str){ | |
if( str[0] == '(') | |
str = str.substr(1,str.length-2); | |
var raw = str.split(' '); | |
current.name = raw.shift(); | |
current.body = []; | |
str = raw.join(" "); |
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
const AUTH0_URI = 'YOUR_URI'; | |
const AUTH0_TOKEN = 'YOUR_TOKEN'; | |
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'; |
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
var fs = require('fs'); | |
var Buffer = require('buffer').Buffer; | |
// Mp3Id3Reader | |
// Supports Id3v2.3.0 fully | |
// TODO: Add id3v2.2.0 | |
// TODO: Add id3v2.4.0 | |
var id3Reader = function(){ |
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
var fs = require('fs'); | |
var Buffer = require('buffer').Buffer; | |
// Mp3Id3Reader | |
// Supports Id3v2.3.0 fully | |
// TODO: Add id3v2.2.0 | |
// TODO: Add id3v2.4.0 | |
var id3Reader = function(){ |
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
var fs = require('fs'); | |
var Buffer = require('buffer').Buffer; | |
// Mp3Id3Reader | |
// Supports Id3v2.3.0 fully | |
// TODO: Add id3v2.2.0 | |
// TODO: Add id3v2.4.0 | |
var id3Reader = function(){ |
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
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbgAAAGaCAYAAAB9rlaOAAAgAElEQVR4nOydv47ryJXGPy2cjGGDvJhJPLBB3mQmJC8m2knIxqRjiJNsMIl4kw02Ie++gKgH2JU6dSJ24mCTZsOxQeoBFqLCnUQUdmAnOxCFNdYhN+g5dYsUJVH/WqL6/AAB3RJZLBar6mPVOXWqUxRFAYZhGIa5Mf7h0hlgGIZhmHPAAscwDMPcJCxwDMMwzE3CAscwDMPcJCxwDMMwzE3yi7ovR6MRPnz48NJ5uUo0TYOu6wedq+v6weeqqgrTNF/83Fsnz3Okabr2t0yWZciy7KD0qexd19347LMsg+/7yPP8oGvcEpes57ZtH3wu04wkSda+29TummLbduO+tVO3TMC2bUwmk4MzwLQfRVGOFslLCG2aprXC8dL1eTwew3Xd2t+CIMBgMHjR/DCnxbKso9M4hcC+tEhvevmT291LtDXP8zAajXYeVzuCY5jVanWSivr09HSC3LSPQ0eATDs4Rds4RRqv9UWp6QiQBY5hDqBuhJvnOWaz2YVyxDBMlZ0CZxhGo6Egcxrq5qyZl6Nubr/pfH+SJLi7uxN/N6Xf7++RQ+YYNk1hMy9Dndlikymjbvq10+kAOOEITlVVNsa+IFzWr48gCC6dBYZpFavVqtFxtcsEjvFwYZjXivwWuq0NsX2OYQ5D0zTxd5N2VCtwTdWRYZiPqKoq/t7WhljgGOYwZFPBwQLHMMzxsK2HYS7LToHjBcMMcxhNpvrlKReGYZrTxJFrp8DJ0y4Mw5yWQyPdMAyzG56iZJgTYhiG+JttbQxzWuQXwiYmgLMu9M7zfG0Nne/7pVFhlmUIw7D2GPrNcRwxVUqhYvZxp69zw7Zt+2CXfBoa0/lBEJTSo/vZFKrpEOi+6QHXlcGpyjJNU6RpKjroJm7sNB1XN6Ut571qJKZrAdgav7EtVOv2paiGVDomLmpbeI33/NqQn2cjb/+iBgDi0+/36w |
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
<link href='http://fonts.googleapis.com/css?family=Ubuntu:300,400' rel='stylesheet' type='text/css'> | |
<nav id="main-nav"> | |
</nav> | |
<div id="main-map" class="map-container"></div> | |
<div id="campaign" class="widget accordion"> | |
<div class="page"> | |
<header>Project X</header> | |
<div class="content"> |
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
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(); |
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
C:\Users\abhis\Downloads>ab -n 1000 -c 100 http://192.168.1.5:4322/ | |
This is ApacheBench, Version 2.3 <$Revision: 1706008 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 192.168.1.5 (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
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
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){ |