Skip to content

Instantly share code, notes, and snippets.

monomon /
Last active Oct 26, 2017
Script to timestamp files with their last modification date, optionally adding a counter
# timestamp passed files
# by inserting the date into the filename
# The linux `rename` command is great, but it doesn't allow
# inserting a consecutive counter into the filename
# if there is a conflict.
# Also, there is the amazing Thunar Bulk Rename tool,
monomon / String.prototype.template.js
Created Oct 3, 2015 — forked from WebReflection/String.prototype.template.js
ES6 Template like strings in ES3 compatible syntax.
View String.prototype.template.js
// accepts optional transformer
// now transformers are compatible with ES6
String.prototype.template = function (fn, object) {'use strict';
// Andrea Giammarchi - WTFPL License
hasTransformer = typeof fn === 'function',
stringify = JSON.stringify,
re = /\$\{([\S\s]*?)\}/g,
strings = [],
values = hasTransformer ? [] : strings,
# -*- coding: utf-8 -*-
Create a catalog of articles
As a rule I finish the layout with some hand touches, but the bulk of it is generated.
For each article display name, description, photo.
Layout articles in two columns on the page.
Articles are grouped by category and each category begins on a new page.
Find a finished example at
monomon / jack_start
Created Jul 19, 2014
jack detect card from aplay and start
View jack_start
# query card number from aplay
card=`aplay -l | sed -n '/Komplete/s/card\ \([0-9]\).*device \([0-9]\).*/hw:\1,\2/p'`
if [ -z $card ]
echo "Komplete card not found"
You can’t perform that action at this time.