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 / 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');
@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 / 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 / main.go
Created May 15, 2019 09:20
SSH remote execution and SCP
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"path"
"sync"

Keybase proof

I hereby claim:

  • I am makkes on github.
  • I am makkes (https://keybase.io/makkes) on keybase.
  • I have a public key whose fingerprint is 0981 E8F0 11B0 8926 D25B E530 EB52 5E0F 02B5 2140

To claim this, I am signing this object:

import cv2 as cv
import time
delay = 5
if __name__ == "__main__":
cap = cv.VideoCapture("/dev/video2")
if not cap.isOpened():
print("Cannot open camera")
exit(1)
#!/usr/bin/env bash
#
# A silly little kubectl plugin helping you become more intimate with your Kubernetes
# cluster.
#
# 1. Download the file
# 2. Put it somewhere within your `$PATH`
# 3. Make it executable
# 4. `kubectl im-feeling-lucky`
@makkes
makkes / code.mmd
Last active September 5, 2022 14:04
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import requests
import datetime
import numpy as np
import os
import json
import sys
repo = "weaveworks/weave-gitops" # Replace with the name of the repository
access_token = "<access_token>" # Replace with your GitHub access token