Skip to content

Instantly share code, notes, and snippets.

<html>
<body>
<video id="v" width="300" height="300"></video>
<input id="b" type="button" disabled="true" value="Take Picture"></input>
<canvas id="c" style="display:none;" width="300" height="300"></canvas>
</body>
<script>
navigator.getUserMedia({video: true}, function(stream) {
var video = document.getElementById("v");
var canvas = document.getElementById("c");
@newshorts
newshorts / colors.json
Last active August 29, 2015 13:59
Translate any rgb value to 256 8-bit colors and back. Use the 'color' value as a key to the array in the json file.
["0,0,0",
"35,0,1",
"71,1,2",
"107,2,6",
"142,4,10",
"178,6,16",
"214,9,21",
"249,13,27",
"1,35,2",
"36,36,2",
@newshorts
newshorts / main.m
Created April 4, 2014 02:04
Objective C application for determining if one of your 99 problems is a bitch?
//
// main.m
// NinetyNineProblems
//
// Created by Mike Newell on 4/3/14.
// Copyright (c) 2014 Mike Newell. All rights reserved.
//
#import <Foundation/Foundation.h>