Skip to content

Instantly share code, notes, and snippets.

View nchase's full-sized avatar

Noah Chase nchase

View GitHub Profile
@nchase
nchase / CreateAudioContextContainer.js
Created March 3, 2019 16:19
Container for CreateAudioContext: returns an audioContext, audioSources (e.g. media elements), and an analyser node that all sources are connected to.
import createAudioContext from 'ios-safe-audio-context';
export async function createAudioContextContainer() {
// createAudioContext (this could be some other implementation/polyfill,
// so long as it returns an audioContext):
const audioContext = createAudioContext();
const audioSources = [];
const analyserNode = audioContext.createAnalyser();
@nchase
nchase / index.js
Created July 31, 2017 11:54 — forked from davidguttman/index.js
requirebin sketch
var Color = require('color')
var Isomer = require('isomer')
var Simplex = require('perlin-simplex')
var Point = Isomer.Point
var Shape = Isomer.Shape
var simplex = new Simplex()
var baseColor = Color('#0096B0')
@nchase
nchase / webpack.config.js
Created January 23, 2017 15:44
Webpack EnvironmentPlugin
// Webpack's poorly-documented EnvironmentPlugin
//
// Read more here: https://github.com/webpack/webpack/blob/master/lib/EnvironmentPlugin.js
var webpack = require('webpack');
module.exports = {
plugins: [
new webpack.EnvironmentPlugin([
'NODE_ENV'
@nchase
nchase / git-grep-config.sh
Last active December 30, 2016 20:25
git-grep configuration
# git-grep configuration – `man git-grep | cat && open https://git-scm.com/docs/git-grep`
## turn off pager; print results directly to stdout instead:
git config --global pager.grep false
## enable line numbers by default:
git config --global grep.lineNumber true
## you can't set --ignore-case in git config.
## so instead, add the `-i` flag (short for`--ignore-case`)
@nchase
nchase / index.html
Last active May 10, 2019 02:47
MutationObserver doesn't observer inner frame on `document.write` in IE11
<h1>Run A Web Server Here Via <pre style="display: inline-block; background-color: #ddd; padding: 0.5em; border-radius: 5px;">python -m SimpleHTTPServer 9999</pre><h1>
Outer Frame. Hello!
<br/>
<iframe id="our-frame" style="width: 100%;"></iframe>
<script src="script.js"></script>
# --- constrain to larger if no other users ---
set -g aggressive-resize on
# --- faster repeats ---
set-option -g repeat-time 0
# --- unset rbenv_version: ---
set-environment -gu RBENV_VERSION
:nnoremap <F6> :%s/™\|®//gc<CR>