Skip to content

Instantly share code, notes, and snippets.

View Dockerfile
FROM ubuntu:16.04 as builder
RUN set -ex && \
apt-get update && \
apt-get --no-install-recommends --yes install \
ca-certificates \
cmake \
g++ \
make \
pkg-config \
@guybrush
guybrush / face-cam.html
Last active Jun 28, 2018
face-detection cam-example
View face-cam.html
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>face-landmark-cam-example</title>
</head>
<body>
<style>
#container {position:relative;}
#overlay {position:absolute; top:0; left:0;}
View gist:bb012ce3f7f4ae4090a3243bad455065
pub fn pack_to(&mut self, chunk: &Chunk, buf: &mut Vec<u8>) {
let pow2_16 = 2u32.pow(16);
let mut last_v: u8 = chunk.data[0];
let mut i = 1;
let mut r = 1;
let mut v: u8 = 0;
let mut i_8 = 0;
let mut i_16 = 0;
let mut i_32 = 0;
let mut i_16 = 0;
View keybase.md

Keybase proof

I hereby claim:

  • I am guybrush on github.
  • I am guybrush (https://keybase.io/guybrush) on keybase.
  • I have a public key ASDJmQzO9FVoTT8IWHdW1S5j54KHaNhUR5Tt3zDM5bSn7Ao

To claim this, I am signing this object:

@guybrush
guybrush / index.js
Last active May 14, 2016
requirebin sketch
View index.js
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)
@guybrush
guybrush / index.js
Created Apr 19, 2016
requirebin sketch
View index.js
// 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
})
View k8s-test-configmap.sh
#!/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
View index.html
<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')
View nginx-rc.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
namespace: default
labels:
name: nginx
spec:
replicas: 1
selector:
@guybrush
guybrush / gist:47bcd5f4e41a3be102b2
Last active Aug 29, 2015
kubernetes dns with a patched hack/local-up-cluster.sh
View gist:47bcd5f4e41a3be102b2
$ ~/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
You can’t perform that action at this time.