Skip to content

Instantly share code, notes, and snippets.

View enricostano's full-sized avatar

Enrico Stano enricostano

View GitHub Profile
@franciscoj
franciscoj / vid2gif.sh
Created August 4, 2016 14:50
Transform a video into an animated gif.
#!/bin/sh
# Extracted from: http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html#usage
palette="/tmp/palette.png"
filters="fps=15,scale=640:-1:flags=lanczos"
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
@mcgrew
mcgrew / etc_conf.d_routing
Created July 9, 2013 17:00
Systemd service to enable NAT routing.
wan_interface=ens32
lan_interface=ens33
@webgio
webgio / app.coffee
Last active December 10, 2023 10:24
Marionette.js module to manage authentication. Needs a server method that checks credentials returning true or false. Started from this blog post code: http://clintberry.com/2012/backbone-js-apps-authentication-tutorial/
App = new Marionette.Application();
App.addRegions {
"headerRegion": "#header"
"topMenuRegion": "#top-menu"
"mainRegion" : "#main"
}
App.on 'initialize:after', ->
Backbone.history.start()