Skip to content

Instantly share code, notes, and snippets.

View makkes's full-sized avatar
🤓
My voice is my passport. Verify me!

Max Jonas Werner makkes

🤓
My voice is my passport. Verify me!
View GitHub Profile
@makkes
makkes / props.sh
Last active February 8, 2019 09:02
Read properties files in Bash
read_props() {
local key
if [[ ! -r $1 ]] ; then
echo file $1 not readable
exit 1
fi
while IFS='=' read -r key value
do
if [[ -z ${key} ]] || [[ "${key}" =~ ^# ]] ; then
continue
@makkes
makkes / gist:44675a0ef9c61aa88283
Last active August 29, 2015 14:07
wrtc DataChannel test
var wrtc = require('wrtc');
var pcs = [],
done = [],
MAX_PCS = 30;
pcoptions = {
iceServers: []
};
@makkes
makkes / gist:9762010
Created March 25, 2014 13:40
pc2 onopen fires non-deterministically
var RTCPeerConnection = require('wrtc').RTCPeerConnection;
var RTCIceCandidate = require('wrtc').RTCIceCandidate;
var RTCPeerConnectionIceEvent = require('wrtc').RTCPeerConnectionIceEvent;
var pc1 = new RTCPeerConnection(null);
var pc2 = new RTCPeerConnection(null);
var channel = pc1.createDataChannel(null, {});
channel.onopen = function(ev) {
console.log('open');