Skip to content

Instantly share code, notes, and snippets.

View gabrielstuff's full-sized avatar

Gabriel gabrielstuff

View GitHub Profile
@gabrielstuff
gabrielstuff / client.js
Last active September 2, 2016 21:16 — forked from sahat/client.js
Calculate client-server latency using socket.io
var socket = require('socket.io-client')('http://spacebro.space:8080');
var startTime;
setInterval(function() {
socket.emit('latency', Date.now(), function(startTime) {
var latency = Date.now() - startTime;
console.log(latency);
})
}, 2000);
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid --with-libvidstab --with-libvpx
# Easy Peasy
ffmpeg -i video.mp4 video.webm
@gabrielstuff
gabrielstuff / 0_reuse_code.js
Created October 18, 2013 08:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gabrielstuff
gabrielstuff / hack.sh
Created March 31, 2012 23:52 — forked from erikh/hack.sh
OSX For Hackers
#!/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
#
@gabrielstuff
gabrielstuff / each_with_index.js
Created March 3, 2012 16:00 — forked from burin/each_with_index.coffee
each_with_index handlebars helper, adds an {{index}} prop accessible from within the block
// {{#each_with_index records}}
// <li class="legend_item{{index}}"><span></span>{{Name}}</li>
// {{/each_with_index}}
Handlebars.registerHelper("each_with_index", function(array, fn) {
var total = array.length;
var buffer = "";
for (var i = 0, j = array.length; i < j; i++) {
var item = array[i];
@gabrielstuff
gabrielstuff / dabblet.css
Created January 2, 2012 16:03 — forked from superkevin/dabblet.css
saucisse
/**
saucisse
*/
#titre {
font-family: arial;
margin-left : 20px;
color : gray;
}
@gabrielstuff
gabrielstuff / gist:1327164
Created October 31, 2011 09:19 — forked from mrdoob/gist:1325393
ffmpeg: recording the screen.
ffmpeg -f x11grab -b 1M -bt 2M -r 30 -s 512x512 -i :0.0+1,53 -an kinect.webm