Skip to content

Instantly share code, notes, and snippets.

Avatar
🌍
🔥⌛️(⧖)

Xavier Damman xdamman

🌍
🔥⌛️(⧖)
View GitHub Profile
@xdamman
xdamman / install_ffmpeg_ubuntu.sh
Created Jul 2, 2014
Install latest ffmpeg on ubuntu 12.04 or 14.04
View install_ffmpeg_ubuntu.sh
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# 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
xdamman / transparent-funding.md
Created Jul 19, 2019
Tool for transparent funding (donations / expenses)
View transparent-funding.md

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 https://opencollective.com/XR-Belgium

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 https://opencollective.com/XR-belgium/expenses).

@xdamman
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
xdamman / laura-addition.sh
Created Aug 25, 2018
Simple program to add two numbers and say them for my 5 y/o daughter.
View laura-addition.sh
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 https://explorer.blockstack.org/address/1KNrgdqojAyFDx7tWVhsDN2Fbt5YJ2dZMt
@xdamman
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 https://www.facebook.com/friends/requests/
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
xdamman / tweetbot-storify.md
Created Mar 17, 2012
Creating a story with tweets using the Storify API
View tweetbot-storify.md

Get the user token

$ curl -d 'username=apitest&password=test&api_key=4f63e62da2cbc21091d62d60' https://api.storify.com/v1/auth

Response

{"content":{"username":"apitest","_access":0,"bio":null,"location":null,"website":"http://storify.com/apitest","avatar":"http://storify.com/public/img/default.avatar.png","permalink":"http://storify.com/apitest","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
xdamman / install ghost on macosx 10.9.sh
Last active Dec 30, 2015
How to install https://ghost.org on your local machine (MacOSX 10.9)
View install ghost on macosx 10.9.sh
#!/bin/bash
git clone https://github.com/TryGhost/Ghost.git
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
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 https://gist.github.com/simonw/640331 and adapted for Varnish 3.x.
View varnish-jsonp.vcl
#<jsonp>
# We go BACK to varnish to get it to generate an ESI template that
# generates a JSON-P response.
backend jsonp_template_backend {
.host = "127.0.0.1";
.port = "80"; # use the port that varnish is listening on
}
# <jsonp>
# How the jsonp_template_backend dispatches to the ESI generating code: