Skip to content

Instantly share code, notes, and snippets.


Xavier Damman xdamman

View GitHub Profile
xdamman /
Created Jul 2, 2014
Install latest ffmpeg on ubuntu 12.04 or 14.04
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
xdamman /
Created Jul 19, 2019
Tool for transparent funding (donations / expenses)

Transparency is important, especially when it comes to funding. As the [Extinction Rebellion] movement grows internationally, everyone should be able to know at all times how much has been raised at the global level and how is the money used to develop the movement. First, I'll share our experience at XR Belgium, then I'll share a proposal for the movement in general.

How we do it at XR Belgium

We are using Open Collective. See

People can donate money online or by bank transfer. Every time anyone needs money (for supplies and material, renting a place for our general assemblies, etc.), they simply submit the expense or the invoice of the vendor to the collective. All expenses are public and transparent (see

xdamman / gist:9a6774d758c1333e651947ad5e104860
Created Feb 7, 2019
npx semantic-release mediumexporter
View gist:9a6774d758c1333e651947ad5e104860
npx semantic-release
[4:44:39 PM] [semantic-release] › ℹ Running semantic-release version 15.13.3
[4:44:40 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
[4:44:40 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
[4:44:40 PM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[4:44:40 PM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[4:44:40 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/npm"
[4:44:40 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/npm"
[4:44:40 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
[4:44:40 PM] [semantic-release] › ✔ Loaded plugin "success" from "@semantic-release/github"
xdamman /
Created Aug 25, 2018
Simple program to add two numbers and say them for my 5 y/o daughter.
run() {
Q1="Enter a first number:"
echo $Q1
say $Q1
read A
say $A
Q2="Enter a second number $1:"
echo $Q2
say $Q2
read B
View blockstack
Verifying my Blockstack ID is secured with the address 1KNrgdqojAyFDx7tWVhsDN2Fbt5YJ2dZMt
xdamman / Accept all friends requests.js
Created Dec 21, 2012
Facebook friend requests zero I had 236 pending friends requests, so I decided to accept them all as a gesture before the end of the world. I wasn't ready to click on them all so just made that quick script you can run in the console when you are on the page
View Accept all friends requests.js
var a = document.getElementsByTagName('input');
for(var i=0;i<a.length;i++) if(a[i].getAttribute('value')=='Confirm') a[i].click();
xdamman /
Created Mar 17, 2012
Creating a story with tweets using the Storify API

Get the user token

$ curl -d 'username=apitest&password=test&api_key=4f63e62da2cbc21091d62d60'


{"content":{"username":"apitest","_access":0,"bio":null,"location":null,"website":"","avatar":"","permalink":"","settings":{"comments":null,"facebook_autoshare":true,"sxsw":false,"notifications":{"newsletter":true,"digest":true,"likes":true,"comments":true,"follower":true,"autoshare":true}},"stats":{"stories":4,"views":0,"embeds":0,"subscriptions":1,"subscribers":0},"date":{"updated":"2012-03-17T01:23:53.504Z","last_seen":"2012-03-17T01:23:53.503Z","featured":null,"created":"2012-03-17T00:17:36.951Z"},"subscribers":[],"subscriptions":[{"username":"storify","_access":1,"name":"Storify","bio":"Making stories from the social Web, finding moments to remember in the real-time stream. Co-founded by @burtherman and @xdamman","location":"Global","website":"http://storify
View .profile
alias reload="source ~/.profile"
#function ssh {
# ~/.scripts/iterm-setName $1
# /usr/bin/ssh $1
# git alias
alias gco="git commit -am"
alias glog='git log --date-order --all --graph --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d %Creset%s"'
xdamman / install ghost on macosx
Last active Dec 30, 2015
How to install on your local machine (MacOSX 10.9)
View install ghost on macosx
git clone
cd Ghost
git submodule update --init
sudo gem install sass && sudo gem install sass
sudo npm install -g grunt-cli
npm install
grunt init
npm start
open "http://localhost:2368/ghost/"
xdamman / varnish-jsonp.vcl
Last active Dec 27, 2015
Make Varnish 3.x handle jsonp requests so that we can cache them (even when jQuery generates random callback function names when using $.getJSON). Inspired by and adapted for Varnish 3.x.
View varnish-jsonp.vcl
# We go BACK to varnish to get it to generate an ESI template that
# generates a JSON-P response.
backend jsonp_template_backend {
.host = "";
.port = "80"; # use the port that varnish is listening on
# <jsonp>
# How the jsonp_template_backend dispatches to the ESI generating code: