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 Readable = require('stream').Readable; | |
const Writable = require('stream').Writable; | |
let counter = 0; | |
const readable = new Readable({ | |
read(size) { | |
counter++; | |
this.push(counter.toString()); |
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(self) { | |
'use strict'; | |
// if (self.fetch) { | |
// return | |
// } | |
var support = { | |
searchParams: 'URLSearchParams' in self, | |
iterable: 'Symbol' in self && 'iterator' in Symbol, | |
blob: 'FileReader' in self && 'Blob' in self && (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
// Adaptador para conectar o Socket.IO no SailsJS - Socket Client (sails.io.js) | |
// https://github.com/socketio/socket.io-client-java | |
package br.com.example.websocket; | |
import android.util.Log; | |
import com.github.nkzawa.emitter.Emitter; | |
import com.github.nkzawa.socketio.client.Ack; | |
import com.github.nkzawa.socketio.client.IO; |
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 shuffle = (function(){ | |
var random = function(min, max) { | |
return min + Math.floor(Math.random() * (max - min + 1)); | |
}; | |
return function(set) { | |
var length = set.length; | |
var shuffled = Array(length); | |
for (var index = 0, rand; index < length; index++) { | |
rand = random(0, index); |
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
@echo off | |
SET st2Path=C:\Program Files\Sublime Text 2\sublime_text.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" /t REG_SZ /v "" /d "Open with Sublime Text 2" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 2" /t REG_SZ /v "" /d "Open with Sublime Text 2" /f |