Skip to content

Instantly share code, notes, and snippets.

bensquire / pagination.html.twig
Created Jan 27, 2017 — forked from omerucel/pagination.html.twig
A gist for pagination in Twig, based on the total number of pages, the current page and some URL-settings.
View pagination.html.twig
Updated by: Simon Schick <>
* currentFilters (array) : associative array that contains the current route-arguments
* currentPage (int) : the current page you are in
* paginationPath (string) : the route name to use for links
* showAlwaysFirstAndLast (bool) : Always show first and last link (just disabled)
* lastPage (int) : represents the total number of existing pages
bensquire / countries.json
Created Oct 20, 2016
JSON Country List based on the ISO-3366-1 Alpha-3 Codes, with eu countries marked
View countries.json
"code": "AFG",
"name": "Afghanistan",
"eu": false
"code": "ALA",
"name": "Åland Islands",
"eu": false
bensquire /
Last active May 10, 2020
Convert directory of MP4's to MKV's using ffmpeg (tested on OSX)
for i in *.mp4; do
ffmpeg -i "${i}" -c:v copy -c:a copy "${i}.mkv"