Skip to content

Instantly share code, notes, and snippets.

@jbeuckm
jbeuckm / gist:10950742
Created April 17, 2014 03:24
keybase.md
### Keybase proof
I hereby claim:
* I am jbeuckm on github.
* I am jbeuckm (https://keybase.io/jbeuckm) on keybase.
* I have a public key whose fingerprint is 98AA E0F0 FC55 604F 78FB 1DC9 80A6 12E4 1266 F8B3
To claim this, I am signing this object:
@jbeuckm
jbeuckm / insertStyles.js
Created May 15, 2014 16:13
Insert styles into the head element with jquery
function insertStyles(selectors, styles) {
var text = selectors.join(', ') + ' { ';
for (var i in styles) {
text += i + ':' + styles[i] + '; ';
}
text += '}';
@jbeuckm
jbeuckm / 020_replace_strings.js
Created June 17, 2015 14:49
Cordova hook to replace strings in the javascript.
#!/usr/bin/env node
// this plugin replaces arbitrary text in arbitrary files
//
// Look for the string CONFIGURE HERE for areas that need configuration
//
var fs = require('fs');
var path = require('path');
var glob = require("glob");
@jbeuckm
jbeuckm / index.js
Created July 21, 2015 18:33
Using the `fft` library from `npm`.
var FFT = require('fft');
FFT_SIZE = 8;
var fft = new FFT.complex(FFT_SIZE, false);
var ifft = new FFT.complex(FFT_SIZE, true);
var inBuffer = new Float32Array([0,.5,1,.5,0,-.5,-1,-.5]);
var outBuffer = new Float32Array(2 * FFT_SIZE);
var outBuffer2 = new Float32Array(2 * FFT_SIZE);
@jbeuckm
jbeuckm / server.js
Created November 17, 2015 16:31
Very simple HTTP responder
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(process.env.PORT, process.env.IP);
console.log('Server running!');
@jbeuckm
jbeuckm / index.html
Last active December 17, 2015 13:59 — forked from ZJONSSON/index.html
Doing X3Dom with D3
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://x3dom.org/x3dom/example/x3dom.js"></script>
</head>
<body>
</body>
@jbeuckm
jbeuckm / index.html
Last active December 17, 2015 17:19
Converted to simple squares.
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://x3dom.org/x3dom/example/x3dom.js"></script>
</head>
<body>
</body>
@jbeuckm
jbeuckm / globe.png
Last active December 19, 2015 07:59
CSS Position Particles (500)
globe.png
@jbeuckm
jbeuckm / globe.png
Last active December 19, 2015 14:48
Canvas Particles (2000)
globe.png
@jbeuckm
jbeuckm / index.html
Last active January 3, 2016 20:19
Hello, Three.js
<html>
<head>
<title>My first Three.js app</title>
<style>
body {
margin: 0;
}
canvas {
width: 100%;
height: 100%