This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========================================================== | |
// CUSTOM JAVASCRIPT CONSOLE | |
// built by jakub fiala | |
// | |
// this small script intercepts the standard console methods | |
// and provides a way of accessing their messages, | |
// as well as stack traces, which is really cool. | |
// it formats the stack traces for popular browsers | |
// | |
// contributions welcome! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// like python's range, yields numbers from start to end (not inclusive) | |
export const range = function* (start, end, step = 1) { | |
let index = start; | |
while (index < end) { | |
yield index; | |
index++; | |
} | |
} | |
// like python's enumerate, yields [index, item] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const loadShader = (context, type, source) => { | |
const shader = context.createShader(type); | |
// Send the source to the shader object | |
context.shaderSource(shader, source); | |
// Compile the shader program | |
context.compileShader(shader); | |
// See if it compiled successfully | |
if (!context.getShaderParameter(shader, context.COMPILE_STATUS)) { | |
console.error('An error occurred compiling the shaders: ' + context.getShaderInfoLog(shader)); | |
context.deleteShader(shader); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Because meyda v2 doesn't really have an offline extraction API, we need to manually require some stuff | |
var jsfft = require("./node_modules/meyda/node_modules/jsfft/") | |
var complex_array = require("./node_modules/meyda/node_modules/jsfft/lib/complex_array.js") | |
var extractors = require("./node_modules/meyda/dist/node/featureExtractors.js") | |
var meyda_utils = require("meyda").utils | |
//this is a simple class for streaming WAV data as Float32Arrays | |
//available at https://gist.github.com/jakubfiala/cb9de100fdd4f043d46e | |
//we're not going to use its streaming functionality for simplicity | |
var WavManager = require("./wav-manager.js") | |
var fs = require('fs') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
if [[ "$#" -ne 2 ]]; then | |
echo "Usage: ./boomerang.sh src_file out_file" | |
fi | |
SRC=$1 | |
OUT=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://glslsandbox.com/e#46760.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Badge Text" : "", | |
"Working Directory" : "\/Users\/jakub", | |
"Prompt Before Closing 2" : 0, | |
"Selected Text Color" : { | |
"Green Component" : 0, | |
"Blue Component" : 0, | |
"Red Component" : 0 | |
}, | |
"Rows" : 25, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
¯\_(ツ)_/¯ | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>ohwell</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> | |
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// creates a Sequence for the given AudioContext, which changes the `param` of the `node` according to a specified `seq` array with a given `smoothness` | |
// Example of a `seq` array: | |
// [ [0, 440], [1, 220], [1.5, 330], [2, 440] ] | |
// English: set the value to 440 immediately, then to 220 after 1 second, then to 330 after 1.5 seconds, then return to 440 after 2 seconds | |
// | |
// returns an object containing 3 methods: | |
// | |
// - `playOnce` will perform the sequence once | |
// - `loop` will loop the sequence indefinitely | |
// - `stop` will stop looping the sequence |
NewerOlder