Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.
brew install ffmpeg --with-libvidstab
# Quick hack of regular expressions to convert twitter bootstrap from LESS to Stylus | |
less2stylus = (string) -> | |
string = string | |
.replace(/^(\ *)(.+)\ +\{\ *\n?\ */mg, "$1$2\n$1 ") # remove opening brackets | |
.replace(/^(\ *)([^\ ]+)\ +\{\ *\n?\ *?/mg, "$1$2\n$1 ") # remove opening brackets | |
.replace(/\ *\{\ *\n*/g, "\n") # remove opening brackets again (some random cases I'm too lazy to think through) | |
.replace(/\ *\}\ *\n*/g, "\n") # remove closing brackets | |
.replace(/\;\ *?$/gm, "") # remove semicolons | |
.replace(/@(\w+):(\ *)\ /g, "\$$1$2 = ") # replace @variable: with $variable = | |
.replace(/\@/g, "\$") |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
var server = require( 'http' ).createServer(); | |
// our html template | |
var script = function( f ) { | |
// get just the content of this script | |
var s = /^[^\{]+\{\n?([\s\S]+)\}/.exec( f )[1]; | |
return [ | |
'<!DOCTYPE html><html>', | |
'<head>', | |
'<script type="text/javascript">',s,'</script>', |
// all this `toJSON()` does is filter out any circular refs. all other values/refs, | |
// it passes through untouched, so it should be totally safe. see the test examples. | |
Object.prototype.toJSON = function() { | |
function findCircularRef(obj) { | |
for (var i=0; i<refs.length; i++) { | |
if (refs[i] === obj) return true; | |
} | |
return false; | |
} |
#!/usr/bin/env node | |
// mc hammer javascript cross-compiler | |
// 1. youtube-dl http://www.youtube.com/watch?v=otCpCn0l4Wo -o cant_touch_this.flv | |
// 2. avconf -o cant_touch_this.flv cant_touch_this.wav | |
// 3. sox cant_touch_this.wav -t s16 -r 8k -o cant_touch_this.raw | |
// 4. run this file (node make_touch_this.js) | |
// 5. npm install -g baudio-party | |
// 6. baudio-party & | |
// 7. curl -sSNT cant_touch_this.js http://localhost:5000/0 |
// all values are of type [x, y] | |
// and are coordinates, x being time, y being amplitude | |
// ie. env = require('./')([1/16, 1], [1/32, .9], [3/32, .9], [1/2, 0]) | |
// returns an amplitude to multiply yr sample by | |
module.exports = function(a, d, s, r){ | |
function e(t, a, d, s, r){ |
for i in *; do | |
if [ -d "$i" ]; then | |
cd $i; | |
if [ -f "package.json" ]; then | |
zelda ../; | |
fi; | |
cd ..; | |
fi; | |
done |
var asynth = require('../'); | |
var jynth = require('jynth'); | |
var synth = jynth(); | |
var recording = true; | |
var playing = true; | |
var samples = []; | |
process.stdin.setRawMode(true); |
Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.
brew install ffmpeg --with-libvidstab
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>CSS3 Checkbox</title> | |
<style type="text/css"> | |
.checkbox { | |
width: 30px; | |
height: 30px; | |
background-color: #ddd; | |
position: relative; |