- simulation of
- signaling-servers
- peers connect to signaling-servers to introduce themselves to other peers (join the network)
- peers
- p2p-lobby-implmentation with mocked server-api
- connect to server
- peer with other peers
- create/join/leave lobbies
- signaling-servers
This file contains hidden or 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 mat4 = require('gl-mat4') | |
const bunny = require('bunny') | |
const fit = require('canvas-fit') | |
const normals = require('angle-normals') | |
const canvas = document.body.appendChild(document.createElement('canvas')) | |
const regl = require('regl')(canvas) | |
const camera = require('canvas-orbit-camera')(canvas) | |
window.addEventListener('resize', fit(canvas), false) |
This file contains hidden or 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
// This example is a simple demonstration of how to use regl. | |
// The default method exposed by the module wraps a canvas element | |
var regl = require('regl')() | |
// This clears the color buffer to black and the depth buffer to 1 | |
regl.clear({ | |
color: [0, 0, 0, 1], | |
depth: 1 | |
}) |
This file contains hidden or 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
#!/bin/bash | |
echo " | |
this script | |
1) creates a configmap: test-configmap-configmap | |
2) creates a pod: test-configmap-busybox which mounts the configmap as volume | |
3) checks the modification-time of the file inside the volume -> m1 | |
4) changes the data of test-configmap-configmap and waits until the content | |
of the file changes |
This file contains hidden or 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
<html> | |
<body> | |
<div> | |
<button id="btn-enable">enable</button> | |
<button id="btn-disable">disable</button> | |
</div> | |
<iframe id="iframe" sandbox style="height:80%; width:100%;"></iframe> | |
<script> | |
var src = 'https://webrtc.github.io/samples/src/content/getusermedia/gum/' | |
var iframe = document.getElementById('iframe') |
This file contains hidden or 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
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: nginx | |
namespace: default | |
labels: | |
name: nginx | |
spec: | |
replicas: 1 | |
selector: |
This file contains hidden or 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
$ ~/dev/lib/kubernetes/cluster/kubectl.sh logs kube-dns-v8-rqehr kube2sky | |
I0713 05:43:34.025887 1 kube2sky.go:389] Etcd server found: http://127.0.0.1:4001 | |
I0713 05:43:35.028313 1 kube2sky.go:455] Using http://127.0.0.1:8080 for kubernetes master | |
I0713 05:43:35.028353 1 kube2sky.go:456] Using kubernetes API v1 | |
E0713 05:43:35.029755 1 reflector.go:136] Failed to list *api.Endpoints: couldn't get version/kind; json parse error: invalid character '<' looking for beginning of value | |
E0713 05:43:35.030030 1 reflector.go:136] Failed to list *api.Service: couldn't get version/kind; json parse error: invalid character '<' looking for beginning of value | |
E0713 05:43:36.031475 1 reflector.go:136] Failed to list *api.Service: couldn't get version/kind; json parse error: invalid character '<' looking for beginning of value | |
E0713 05:43:36.032777 1 reflector.go:136] Failed to list *api.Endpoints: couldn't get version/kind; json parse error: invalid character '<' looking for beginning |
this is only proof-of-concept for now, code and readme is just a temporary braindump and may change a lot - stay tuned :D
the goal is to provide a simple way to distribute and discover p2p-app-lobbies. a lobby is basically a "room" for people (peers) that are connected to each other via p2p (webrtc). in every lobby the connected peers run a specific application (javascript-program) that utilizes the connections between the peers in some way (video/audio, reliable and
This file contains hidden or 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 SH = require('signalhub') | |
var sp = require('simple-peer') | |
var hat = require('hat') | |
var localGameId | |
var localPlayerId = 'player'+hat() | |
var games = {} | |
var elCreateGame = document.createElement('button') | |
document.body.appendChild(elCreateGame) |
This file contains hidden or 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 SH = require('signalhub') | |
var elLog = document.createElement('pre') | |
document.body.appendChild(elLog) | |
function log(n,d){elLog.innerHTML += n+': '+(d ? JSON.stringify(d) : '')+'\n'} | |
var sh = SH('http://dev.mathiasbuus.eu:8080','towerwarz') | |
var s = sh.subscribe('foo') | |
s.on('data',function(d){log('data',d)}) |