Skip to content

Instantly share code, notes, and snippets.

Francesco Frassinelli frafra

Block or report user

Report or block frafra

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

systemd containers


This how-to uses mybox as container name, mkosi in order to create containers (it works for multiple distributions and has more features compared to dnf --installroot), and crudini for configurations file (you can use your preferred text editor instead).

How to create a container with mkosi

# mkosi --cache /var/cache/mkosi -d fedora -t directory -o /var/lib/machines/mybox
frafra /
Created Jan 21, 2019
Like `ls -1` but marks path modified by a specific author or a company
function check {
git log --format="%ae" "$1" | grep -q "$regex"
check '.' && echo " * ." || echo " ."

VPS cheaper than 5 €/month


Starting from 2.50 €/month (CX11).


  • Custom operating systems via recovery mode
  • Good reputation
frafra /
Last active Nov 16, 2018
Quests - December 2017 #PoliMappersAdventures

Quests - December 2017 #PoliMappersAdventures

  1. Learn something you didn't know about OpenStreetMap
  2. Install StreetComplete (for Android) or Go Maps (for iOS) or
  3. Map a bench
  4. Find a bench and add the backrest tag
  5. Map a picnic table
  6. Find a bench or a picnic table and add the material tag
  7. Map a trash bin (unsorted waste only)
  8. Map a container for recycling of used goods
frafra /
Last active Oct 8, 2018
OSM node history to SQLite
#!/usr/bin/env python3
# OSM node history to SQLite
import osmium
import sqlite3
import sys
frafra /
Last active Sep 13, 2018
Mailbox to HTML conversion using Python 3 + Jinja2 in less than 100 lines (including GPLv3 license)
#!/usr/bin/env python3
# Copyright (C) 2016 - Francesco Frassinelli
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
frafra /
Last active Aug 18, 2018
Script for check slides availability for SotM 2018
# Run this script inside the openstreetmap/stateofthemap-2018 repository
rm -f slides.csv
(for talk in _posts/schedule/*.md; do
slide=$(basename $talk .md | cut -d'-' -f4-)
echo -n $slide
for field in "time" "room" "authors"; do
echo -n ,$(sed -nr "s/$field: \"(.*)\"/\1/p" $talk | tr -d ',')
frafra / ilpost.recipe
Created Jul 13, 2018
Calibre recipe for "Il Post"
View ilpost.recipe
#!/usr/bin/env python2
from calibre.ebooks.BeautifulSoup import BeautifulSoup
from import BasicNewsRecipe
class IlPost(BasicNewsRecipe):
title = "Il Post"
language = "it"
tags = "news"
#feeds = [""]
frafra /
Last active Jul 11, 2018 / recipes
View / recipes

These recipes are for, but they can be used for (replace the URL where necessary).

Note: jq can be required by some recipes.

Get the first 100 unresolved notes (geojson)

curl '' -o notes.geojson
frafra /
Created Jun 28, 2018 basic account information parser
#!/usr/bin/env python3
import bs4 # fades beautifulsoup4
import hug # fades
import humanfriendly # fades
import requests # fades
import datetime
import string
You can’t perform that action at this time.