Skip to content

Instantly share code, notes, and snippets.

View peutetre's full-sized avatar
in a loop, building momo.coach and audio2text.email

Paul Panserrieu peutetre

in a loop, building momo.coach and audio2text.email
View GitHub Profile
var browserify = require('browserify');
var path = require('path');
var fs = require('fs');
var tmp = require('tmp');
var b = browserify();
var output = path.join(__dirname, 'test.js');
var src = path.join(__dirname, 'main.js');
var ws = fs.createWriteStream(output);
tmp.file({ prefix: 'settings-', postfix: '.json' }, function (err, tmpFilePath) {
@peutetre
peutetre / keybase.md
Last active August 29, 2015 14:04
keybase.md

Keybase proof

I hereby claim:

  • I am peutetre on github.
  • I am 42loops (https://keybase.io/42loops) on keybase.
  • I have a public key whose fingerprint is 3B6E 1233 6B99 BC65 D9AA 8676 AF92 07BD 2457 5A92

To claim this, I am signing this object:

@peutetre
peutetre / index.js
Created June 8, 2014 09:31
requirebin sketch
var norm = require('zanimo/src/normalize-transform-value'),
Color = require('color');
var el = document.createElement('div');
el.style.height='300px';
el.style.width='500px';
document.body.appendChild(el);
// testing normalize-transform-value
@peutetre
peutetre / index.js
Created April 25, 2014 15:14
requirebin sketch
var Zanimo = require('zanimo');
var prefix = require('vendor-prefix');
var elt = document.createElement('div');
elt.style.height = '100px';
elt.style.width = '800px';
elt.style.position = 'absolute';
elt.style.top = '50px';
elt.style.left = '50px';
@peutetre
peutetre / .zshrc
Created October 23, 2013 22:27 — forked from SlexAxton/.zshrc
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@peutetre
peutetre / gist:6900094
Created October 9, 2013 11:55
lui stuff
if (config) {
for(var ƒ in config) {
if (typeof config[ƒ] === "function") {
this[ƒ] = lui.bind(config[ƒ], self);
}
}
}
@peutetre
peutetre / index.js
Created July 9, 2013 09:09
made with requirebin.com
// tiny Zanimo.js example
var Zanimo = require('zanimo'),
Qimage = require('qimage');
function setup() {
return Qimage("http://requirebin.com/logo-black.png")
.then(function (img) {
img.style.position = 'absolute';
img.style.top = '100px';
@peutetre
peutetre / example.js
Last active December 16, 2015 02:19
Zanimo.js examples used my talk @paris.js 28
// example 1
// create a cube
var cube = create([{
display:"none",
top:"50px",
left:"200px",
backgroundColor:"rgb(225, 70, 128)"
}])[0];
@peutetre
peutetre / gist:3781590
Created September 25, 2012 12:50
Show Safari remote inspector from the command line
try
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
tell menu bar 1
tell menu bar item "Develop"
tell menu "Develop"
tell menu "iPhone Simulator" of menu item "iPhone Simulator"
delay 1
@peutetre
peutetre / gist:1424872
Created December 2, 2011 21:18
Stupid q.js test (serial join)
<!DOCTYPE html>
<html>
<head>
<script src="q.js"></script>
<script>
function add(millis, answer, msg) {
const defer = Q.defer();
setTimeout(function() {