Skip to content

Instantly share code, notes, and snippets.

View mcattarinussi's full-sized avatar

Mattia Cattarinussi mcattarinussi

  • Italy
View GitHub Profile
/*
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 / concurrent-concat-map.ts
Created December 14, 2019 22:00
Subscribe to multiple inner observables concurrently and emit results in order
import {
from,
BehaviorSubject,
Observable,
ObservableInput,
ObservedValueOf,
OperatorFunction,
MonoTypeOperatorFunction,
} from 'rxjs';
import { mergeMap, delayWhen, finalize, skipWhile, take } from 'rxjs/operators';
@mcattarinussi
mcattarinussi / gpg-ssh-setup.md
Last active December 28, 2024 12:27
A setup guide to use a personal gpg key for ssh authentication

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.

<!-- 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>