Skip to content

Instantly share code, notes, and snippets.

View sherbondy's full-sized avatar

Ethan Sherbondy sherbondy

View GitHub Profile
@sherbondy
sherbondy / mediapipe_hands_world_space.py
Created December 2, 2023 07:07 — forked from eldog/mediapipe_hands_world_space.py
Google Mediapipe Hand Tracking to World Space using OpenCV solvePnP, rendered in OpenGL using PyGame
# MIT License
#
# Copyright (c) 2023 Foxdog Studios
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@sherbondy
sherbondy / README.md
Created January 23, 2022 12:32
Wordate: a Wordle Clone for Playdate Pulp

How to play Wordate

Until the Playdate is widely available, you can play the game via the Playdate Pulp simulator: https://play.date/pulp/

Choose "Import" and select the WordateV2Working.json file after downloading it locally on your computer.


Bonus:

@sherbondy
sherbondy / react-swipeable-views.min.js
Created February 23, 2018 21:59
react swipeable views rolled up
var SwipeableViews=function(e){"use strict";function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={exports:{}},t.exports),t.exports}e=e&&e.hasOwnProperty("default")?e.default:e;var r=n(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),o=n(function(e){var t=e.exports={version:"2.5.3"};"number"==typeof __e&&(__e=t)}),i=(o.version,function(e,t,n){if(function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!")}(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}),a=function(e){return"object"==typeof e?null!==e:"function"==typeof e},u=function(e){if(!a(e))throw TypeError(e+" is not an object!");return e},s=function(e)
@sherbondy
sherbondy / index.html
Last active January 23, 2017 20:04
Example of running google-closure-js in the browser via a Web Worker
<html>
<head>
<title>Closure Compiler JS Browser Demo</title>
</head>
<body>
<div>
<textarea id="src" name="" cols="80" rows="10">
// example script
var x = 1;
@sherbondy
sherbondy / install.sh
Last active January 23, 2017 03:01
How to try out closure-compiler-js
# I couldn't find any documentation inside the closure-compiler-js repo that explained
# how to actually... use it... from the git source, so here you go:
# I'm on a Mac. You'll need to install maven. It is a dependency
# for build.js to make jscomp.js
brew install maven
git clone git@github.com:google/closure-compiler-js.git
cd closure-compiler-js
# Now you need to pull in the java closure-compiler, which is a submodule:
@sherbondy
sherbondy / swipeable-views-build.js
Created September 5, 2016 20:49
Browserified react-swipable-views that expects window.React to already exist
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SwipeableViews = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (process){
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1;
@sherbondy
sherbondy / Ambly.podspec
Last active January 6, 2024 07:22
Ambly Apple TV
Pod::Spec.new do |s|
s.name = 'Ambly'
s.version = '0.6.1'
s.license = { :type => 'Eclipse Public License 1.0', :file => 'LICENSE' }
s.summary = 'ClojureScript REPL into embedded JavaScriptCore'
s.homepage = 'https://github.com/omcljs/ambly'
s.author = 'omcljs'
s.source = { :git => 'https://github.com/omcljs/ambly.git', :tag => '0.6.0' }
s.source_files = 'ObjectiveC/src/*.{h,m}'
s.ios.deployment_target = '8.0'
@sherbondy
sherbondy / gamepad.js
Created December 1, 2015 05:03
Ejecta gamepad api sample app
// Setup canvas with retina res
var canvas = document.getElementById('canvas');
canvas.width = window.innerWidth * window.devicePixelRatio;
canvas.height = window.innerHeight * window.devicePixelRatio;
canvas.style.width = window.innerWidth + "px";
canvas.style.height = window.innerHeight + "px";
var ctx = canvas.getContext("2d");
// The gamepad we draw below is about 1280px wide. We just
@sherbondy
sherbondy / head.py
Last active August 29, 2015 14:21
django ipython hydrogen
# stick this in a PYTHONSTARTUP file, make a custom ipython
# profile *maybe* and stop using relative imports with .
import sys
sys.path.append("/Users/ethanis/code/Clover-1.7/app")
from django.conf import settings
settings.configure(DEBUG=True)
@sherbondy
sherbondy / reconstruct.jl
Created January 3, 2015 03:10
Reconstruct Laplacian Pyramid
# reconstruct an image (approximate, for the time being), from its pyramidal decomposition
function reconstruct(L)
im = last(L)
for n = (length(L)-1):-1:1
# upscale
im2 = zeros(2*size(im)[1], 2*size(im)[2])
im2[1:2:end,1:2:end, :] = im
# gaussian interpolation