Skip to content

Instantly share code, notes, and snippets.

View amiller's full-sized avatar

Andrew Miller amiller

View GitHub Profile
@amiller
amiller / Auction-template.sol
Last active December 12, 2022 05:47 — forked from jcb82/ArbitrationTest.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.19+commit.c4cbbb05.js&optimize=undefined&gist=
pragma solidity ^0.4.22;
import "gist/Timer.sol";
contract Auction {
address internal timerAddress;
address internal sellerAddress;
address internal winnerAddress;
// constructor
@amiller
amiller / testcontract.sol
Created June 14, 2017 18:42 — forked from anonymous/testcontract.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.11+commit.68ef5810.js&optimize=undefined&gist=
pragma solidity ^0.4.0;
contract TestContract {
struct Proposal {
uint voteCount;
string description;
}
address public owner;
Proposal[] public proposals;
@amiller
amiller / glass.html
Last active August 29, 2015 14:00 — forked from amiller/glass.html
[wearscript] Map Trace
<html style="width:100%; height:100%; overflow:hidden">
<head>
<script src="https://gist.githubusercontent.com/amiller/11100038/raw/pacman.js"></script>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<div id="pacman"></div>
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
@amiller
amiller / glass.html
Created April 20, 2014 00:08 — forked from amiller/glass.html
[wearscript] Dizzy Glass Pacman
<html style="width:100%; height:100%; overflow:hidden">
<head>
<script src="https://gist.githubusercontent.com/amiller/11100038/raw/pacman.js"></script>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<div id="pacman"></div>
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
@amiller
amiller / glass.html
Created March 25, 2014 17:52 — forked from rajeshbiib/glass.html
[wearscript] AR Warp with circles
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="offscreen" width="640" height="360" style="display:hidden"></canvas>
<script>
function drawCircle(x, y,tag) {
var width = 640;
var height = 360;
var c = document.getElementById("offscreen");
var ctx = c.getContext("2d");
ctx.fillStyle = 'black'
@amiller
amiller / glass.html
Created March 25, 2014 14:32 — forked from bwhite/glass.html
[wearscript] Big to Glass Calibration
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
function cb(data) {
// Changes canvas color with head rotation
@amiller
amiller / glass.html
Created March 25, 2014 05:27 — forked from bwhite/glass.html
[wearscript] AR Warp with circles
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="offscreen" width="640" height="360" style="display:hidden"></canvas>
<script>
function drawCircle(x, y) {
var width = 640;
var height = 360;
var c = document.getElementById("offscreen");
var ctx = c.getContext("2d");
ctx.fillStyle = 'black'
@amiller
amiller / glass.html
Created March 20, 2014 23:04 — forked from bwhite/glass.html
[wearscript] Example AR Warp
<html style="width:100%; height:100%; overflow:hidden">
<head>
<script src="http://webgl-mjs.googlecode.com/hg/mjs.js" type="text/javascript"></script>
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="offscreen" width="1280" height="720" style="visibility:hidden"></canvas>
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
var d = [1, 2, 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var e = [5, 6, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
function cb(data) {
// Changes canvas color with head rotation
#!/bin/bash
# This file is used to split up the datasets into their own archives before
# they are uploaded to S3.
pushd data/sets/ > /dev/null
mkdir -p data/sets/
mkdir -p ../archives
find . -maxdepth 1 -mindepth 1 -type d -not -name data | while read -r set
do