Skip to content

Instantly share code, notes, and snippets.

@oshoham
oshoham / notes.md
Created February 4, 2016 22:01
Notes for 2/4/2016 RC Presentation

Visualizations in the Browser

Technologies Used

  • Web Audio API (native browser audio playback & low-level DSP tools)
  • SoundCloud public API
  • RxJS (reactive functional programming JS library) (used for displaying SoundCloud search results)
  • Canvas (native browser 2D drawing)

How It Works

@oshoham
oshoham / index.html
Last active February 16, 2016 17:12
U.S. Prison Population by State from 1978-2014
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>U.S. Prison Population From 1978-2014</title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link href="main.css" rel="stylesheet" type="text/css">
<script src="https://d3js.org/d3.v3.min.js" defer></script>
@oshoham
oshoham / keybase.md
Created November 11, 2016 22:34
keybase.md

Keybase proof

I hereby claim:

  • I am oshoham on github.
  • I am osh (https://keybase.io/osh) on keybase.
  • I have a public key whose fingerprint is D032 13BF 189A A36B BA35 711E 0E66 D9A1 476C 69E6

To claim this, I am signing this object:

<!DOCTYPE html>
<html>
<head>
<title>jQuery Fun House Starter Code</title>
</head>
<body>
<div class="section">
<h1>What is your name?
<input id="name">
</h1>
<!DOCTYPE html>
<html>
<head>
<title>jQuery Fun House Solution Code</title>
</head>
<body>
<div class="section">
<h1>What is your name?
<input id="name">
</h1>
@oshoham
oshoham / maskTest.pde
Last active October 4, 2017 00:51
maskTest
PGraphics img1;
PGraphics img2;
void setup() {
size(400, 400);
background(255);
img1 = createGraphics(400, 400);
img2 = createGraphics(400, 400);
@oshoham
oshoham / lunar-lander.ino
Last active January 31, 2018 00:31
Lunar Lander Controller
/*
* Author: Oren Shoham
* Written on 1/30/2018 for Tom Igoe's Tangible Interaction Workshop class at NYU ITP.
*
* References:
* https://github.com/PaulStoffregen/Encoder/blob/master/examples/Basic/Basic.pde
* https://www.arduino.cc/en/Tutorial/KeyboardAndMouseControl
*/
#include <Encoder.h>
@oshoham
oshoham / midi-controller.ino
Created February 14, 2018 08:21
Tangible Interaction Workshop MIDI Controller
#include <Adafruit_LIS3DH.h>
#define USE_ACCELEROMETER true
const int sliderPins[7] = { A1, A2, A3, A6, A7, A8, A9 };
const int sliderThreshold = 20;
const int sliderNoiseThreshold = 30;
const int rotarySwitchPins[4] = { 5, 4, 3, 2 };
const int toggleSwitchPins[2] = { 7, 8 };
@oshoham
oshoham / recorder-processor.js
Created June 24, 2019 22:51
ES5 AudioWorklet Processor
function RecorderProcessor(options) {
AudioWorkletProcessor.call(this);
var processorOptions = options.processorOptions || {};
this.numInputChannels = processorOptions.numInputChannels || 2;
this.recording = false;
this.clear();
this.port.onmessage = function(event) {
@oshoham
oshoham / package.json
Last active August 5, 2020 01:35
Parse the Book of Blaseball from the site's minified JavaScript
{
"name": "blaseball-book-scraper",
"version": "1.0.0",
"description": "",
"main": "parse_blaseball_book.js",
"author": "",
"license": "ISC",
"dependencies": {
"acorn": "^7.4.0",
"acorn-walk": "^7.2.0",