Skip to content

Instantly share code, notes, and snippets.

@Ilgrim
Ilgrim / sw-multiplex.js
Created Apr 15, 2019 — forked from ghaiklor/sw-multiplex.js
Multiplexing downloads via Service Workers
View sw-multiplex.js
/**
* Size of one chunk when requesting with Range
* @type {Number}
* @private
*/
const CHUNK_SIZE = 204800;
/**
* Concat two ArrayBuffers
* @param {ArrayBuffer} ab1
View vimdiff_mini_tutorial.md

Start vimdiff

vimdiff file1 file2

Command Reference - Essentials

Command Description
ctrl+w ctrl+w move cursor to other window
do diff obtain: get currently marked changes from other window
@Ilgrim
Ilgrim / App.js
Created Jan 17, 2019 — forked from Thomas-Smyth/App.js
Reactstrap App.js Example for create-react-app
View App.js
import React, { Component } from 'react';
import {
Collapse,
Navbar,
NavbarToggler,
NavbarBrand,
Nav,
NavItem,
NavLink,
Container,
@Ilgrim
Ilgrim / index.html
Created Jan 9, 2019 — forked from Globik/index.html
Websocket multi room based on ws.js
View index.html
<html>
<body>
<h4>websocket</h4>
<h5>Group: <span id="group">darwin</span></h5>
<!-- a hardoced group name -->
<button onclick="bjoin();">join group</button><br>
<input id="text" type="text"/>
<span id="out"></span>
<script>
var group=document.getElementById("group").textContent;
@Ilgrim
Ilgrim / haproxy.cfg
Created Jan 8, 2019 — forked from lackac/haproxy.cfg
HAProxy configuration with Websocket support
View haproxy.cfg
global
maxconn 4096 # Total Max Connections. This is dependent on ulimit
nbproc 2
log 127.0.0.1 local1 notice
defaults
mode http
log global
frontend all 0.0.0.0:80
@Ilgrim
Ilgrim / haproxy.cfg
Created Jan 8, 2019 — forked from sourcec0de/haproxy.cfg
Here's a sample WORKING haproxy config for websockets / socketio. We were able to get socketio working on an Amazon ELB with just one node, but when we added multiple nodes, we saw weird client issues. So, we decided to use HAProxy on Ubuntu 12.04 and spent significant time trying to get just the right configuration (haproxy.cfg). Note though th…
View haproxy.cfg
global
#debug
#daemon
log 127.0.0.1 local0
defaults
log global
option httplog
frontend unsecured *:80
@Ilgrim
Ilgrim / haproxy.cfg
Created Jan 8, 2019 — forked from strangeminds/haproxy.cfg
simple haproxy.cfg config
View haproxy.cfg
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
@Ilgrim
Ilgrim / public-stun-list.txt
Created Dec 26, 2018 — forked from mondain/public-stun-list.txt
Public STUN server list
View public-stun-list.txt
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
@Ilgrim
Ilgrim / client.html
Created Dec 23, 2018 — forked from ericremoreynolds/client.html
Flask-socket.io emit to specific clients
View client.html
<html>
<body>
<h1>I feel lonely</h1>
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.16/socket.io.min.js"></script>
<script type="text/javascript" charset="utf-8">
var socket = io.connect('http://' + document.domain + ':' + location.port);
socket.on('connect', function() {
socket.emit('connected');
@Ilgrim
Ilgrim / stuns
Created Dec 2, 2018 — forked from yetithefoot/stuns
STUN+TURN servers list
View stuns
{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'},
You can’t perform that action at this time.