Skip to content

Instantly share code, notes, and snippets.

Avatar

Mattia Cattarinussi mcattarinussi

  • Italy
View GitHub Profile
View touchegg.conf
<!-- Dell xps15-9550 - Ubuntu 16.04 -->
<touchégg>
<application name="All">
<!-- Maximize/Restore window -->
<gesture type="DRAG" fingers="3" direction="UP">
<action type="MAXIMIZE_RESTORE_WINDOW"></action>
</gesture>
@mcattarinussi
mcattarinussi / concurrent-concat-map.ts
Created Dec 14, 2019
Subscribe to multiple inner observables concurrently and emit results in order
View concurrent-concat-map.ts
import {
from,
BehaviorSubject,
Observable,
ObservableInput,
ObservedValueOf,
OperatorFunction,
MonoTypeOperatorFunction,
} from 'rxjs';
import { mergeMap, delayWhen, finalize, skipWhile, take } from 'rxjs/operators';
View tabaccomapp-gpx-fix.js
/*
The gpx dowloaded from the activity page on tabaccomapp website does not include <time> elements inside the <trkpt>,
this prevents to upload a gpx downloaded from tabaccomapp to Strava.
This script uses the tabaccomapp json api to construct a gpx containing time elements.
Install dependencies: npm i axios ramda xml2js
Usage: node index.js <TABACCOMAPP-ACTIVITY-URL> <ACTIVITY-START-DATE-ISO> > output.gpx
Example: node index.js https://tabaccomapp-community.it/en/percorso/123-xxx-yyy 2022-01-01T00:00:00.000Z > 123-xxx-yyy.gpx
*/
@mcattarinussi
mcattarinussi / gpg-ssh-setup.md
Last active May 17, 2022
A setup guide to use a personal gpg key for ssh authentication
View gpg-ssh-setup.md

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.