Skip to content

Instantly share code, notes, and snippets.

import { useEffect } from 'react';
export function makeGetAudioCtxSingleton() {
let ctx;
function createAudioCtx() {
return new AudioContext();
}
return () => {
@jebeck
jebeck / .gitignore
Last active November 14, 2019 01:33 — forked from devgru/.gitignore
RGB, HSL and LAB color spaces
.idea
bower_components
@jebeck
jebeck / Nodebook Bug.ipynb
Last active April 24, 2018 06:04
nodebook bug
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@jebeck
jebeck / infinite.js
Last active July 15, 2022 01:10
infinite interactivity with Inquirer and RxJS's Subject
// run with `node infinite.js` in node v4.x+
// must have Inquirer installed (`npm install inquirer`)
const inquirer = require('inquirer');
const Rx = require('rx');
const prompts = new Rx.Subject();
function makePrompt(msg) {
return {
@jebeck
jebeck / simple.js
Created February 6, 2017 00:56
very simple Inquirer.js example
// run with `node simple.js` in node v4.x+
// must have Inquirer installed (`npm install inquirer`)
const inquirer = require('inquirer');
inquirer.prompt([{
name: 'name',
type: 'input',
message: 'What\'s your name?',
}, {
@jebeck
jebeck / .block
Last active February 6, 2017 01:23
overlay experiment
license: mit
@jebeck
jebeck / .gitignore
Last active August 29, 2015 14:24
SVG groups as hooks for interaction
.DS_Store
@jebeck
jebeck / index.html
Last active August 29, 2015 14:23
bar chart without groups
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.9.3/lodash.min.js"></script>
<style type="text/css">
body {
margin: 0;
}
@jebeck
jebeck / index.html
Last active August 29, 2015 14:23
the tiniest bar chart
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.9.3/lodash.min.js"></script>
<style type="text/css">
body {
margin: 0;
}