This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/fish | |
# You can add this to your ~/.config/fish/config.fish | |
function __fish_complete_bash | |
set cmd (commandline -cp) | |
bash -c "source get-bash-completions.sh; get_completions '$cmd'" | |
end | |
# Set the tool to use bash completions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <errno.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <liburing.h> | |
typedef enum { | |
TEST_URING_OP_NONE = 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function argbToRgba(src, inline=false) { | |
let dest = inline ? src : new Uint8Array(src.length); | |
let srcView = new DataView(src.buffer); | |
let destView = new DataView(dest.buffer); | |
for (let i = 0; i < src.length; i += 4) { | |
let argb = srcView.getUint32(i); | |
let rgba = (argb & 0x00FFFFFF) << 8 | | |
(argb & 0xFF000000) >>> 24; | |
destView.setUint32(i, rgba); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CONFIG_PATH=~/.config/Code | |
for i in $CONFIG_PATH/User/workspaceStorage/*; do | |
if [ -f $i/workspace.json ]; then | |
folder="$(python3 -c "import sys, json; print(json.load(open(sys.argv[1], 'r'))['folder'])" $i/workspace.json 2>/dev/null | sed 's#^file://##;s/+/ /g;s/%\(..\)/\\x\1/g;')" | |
if [ -n "$folder" ] && [ ! -d "$folder" ]; then | |
echo "Removing workspace $(basename $i) for deleted folder $folder of size $(du -sh $i|cut -f1)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/python3 | |
import json | |
import sys | |
import os | |
import re | |
import copy | |
input = sys.argv[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
To associate the Italian Electronic Invoices (Fattura Elettronica) to a given | |
program, copy this to | |
~/.local/share/mime/packages/fattura-elettronica.xml | |
And run | |
update-mime-database ~/.local/share/mime | |
Then those .xml files may have a different behavior than standard .xml files | |
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SCHEMA_URI="https://www.fatturapa.gov.it/export/documenti/fatturapa/v1.2.1/Schema_del_file_xml_FatturaPA_versione_1.2.1.xsd" | |
IMPORTED_SCHEMAS=(xmldsig-core-schema.xsd) | |
IMPORTED_SCHEMAS_BASE_URI="https://raw.githubusercontent.com/italia/fatturapa-testsdi/master/core/schemas/" | |
tmp_dir=$(mktemp -d -t fe-xml-lint-XXXXXXXXXX) | |
schemas=("$SCHEMA_URI") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright 2019-2022 - Marco Trevisan | |
# | |
# A Tool to export your invoices in the Italian electronic Fattura Elettronica | |
# format from any IMAP PEC provider (defaulting to Aruba PEC) to your computer | |
# | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# | |
# 2019-2021 - Marco Trevisan | |
# | |
# Fattura Elettronica and python Playground | |
# | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A Shanghai ho partecipato al Trade and Innovation Forum e ho avuto il piacere di presentare proprio le idee che il governo ha su come devono evolvere innovazione e commercio nel nostro Paese. Ecco il mio discorso. | |
Signore e signori, | |
grazie per essere qui, è per me un onore poter parlare qui alla vostra presenza. | |
Questa è la seconda volta nel giro di pochi mesi in cui vengo in Cina, questo perché il nuovo governo italiano ritiene che la Cina sia un partner fondamentale. | |
Ho ascoltato con molta attenzione il discorso del presidente Xi Jinping questa mattina e le sue parole parlano di un progetto di sviluppo di cui noi vogliamo essere protagonisti. | |
L’Italia è la seconda potenza manifatturiera in Europa e, nell’ambito dell’Unione Europea, occupa la quarta posizione sia come cliente che come fornitore della Cina. |