Skip to content

Instantly share code, notes, and snippets.

Francesco Frassinelli frafra

View GitHub Profile
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 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
frafra /
Last active Jun 28, 2018
OpenStreetMap "Top 500" from
#!/usr/bin/env python3
import hug # fades
import enum
import html.parser
import json
import urllib.request
class Table(enum.Enum):
frafra /
Last active May 11, 2018
Detect fake USB drives
#!/usr/bin/env python3
# WARNING: This program will OVERWRITE the entire device and
# you may LOSE DATA. Use it carefully.
# How to create a test block device:
# $ dd if=/dev/zero of=fake bs=1M count=100
# # mknod fake b 7 200
# # losetup /dev/fake fake
frafra / tags.json
Created Apr 6, 2018
addr:street/addr:housenumber simple preset for GeoPaparazzi
View tags.json
"sectionname": "addresses",
"sectiondescription": "addresses",
"forms": [{
"formname": "address",
"formitems": [{
"key": "addr:street",
"value": "",
"type": "string",
"mandatory": "no"
frafra / gpap-notes2osm.sql
Last active Apr 6, 2018
From GeoPaparazzi notes to OpenStreetMap XML
View gpap-notes2osm.sql
This query allows to convert notes from GeoPaparazzi into a OSM XML
file that can be imported into JOSM.
$ sqlite3 geopaparazzi.gpap < gpap-notes2osm.sql > geopaparazzi.osm
Made by:
Francesco Frassinelli -
with body as (
You can’t perform that action at this time.