This file contains hidden or 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 hidden or 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. |
This file contains hidden or 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
// gcc `pkg-config --cflags --libs gio-2.0 glib-2.0 gudev-1.0 libsystemd` /tmp/gpupaths.c -o /tmp/gpupaths &&/tmp/gpupaths | |
#include <errno.h> | |
#include <fcntl.h> | |
#include <malloc.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <unistd.h> |
This file contains hidden or 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 | |
# | |
# Simply cherry picks a revision from a bazaar branch, cloning its metadata | |
# | |
# Usage: | |
# bzr-format-patch [lp:unity] [1234] [--add-bzr-revision] [--stdout] [--only-merged] [-1] | |
if [ -z "$1" ]; then | |
if ! (bzr root &> /dev/null); then | |
echo "It seems you're not in a bazaar branch directory" |
This file contains hidden or 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
/* VSCode keybindings for alternative HJLK navigation, when using non-vim mode | |
* and support for quick panel navigation with Tab/Shift+Tab. | |
* | |
* So basically I just tried to use everywhere in the editor these aliases: | |
* Alt+j = down | |
* Alt+k = up | |
* Alt+l = right | |
* Alt+h = left | |
* Alt+b = previous-word | |
* Alt+w = next-word |
This file contains hidden or 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 | |
export LANG=C | |
output=$1; | |
scale=$2; | |
if [ -n "$output" ] && ! (xrandr --listmonitors | grep -qw "$output"); then | |
echo "Invalid output: '$output'"; | |
exit 1; |
This file contains hidden or 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
/* | |
gcc -shared -fPIC -o liboverride.so gobject-override.c -ldl $(pkg-config --cflags --libs glib-2.0 gtk+-3.0) | |
LD_PRELOAD=./liboverride.so any-binary! | |
*/ | |
#define _GNU_SOURCE 1 | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> |
This file contains hidden or 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
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | |
# | |
# Author: Marco Trevisan <[email protected]> | |
# Copyright (C) 2017-2018 Canonical Ltd | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License version 3 as | |
# published by the Free Software Foundation. | |
# | |
# This program is distributed in the hope that it will be useful, |
This file contains hidden or 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
sub_version=3131; (cd /tmp && wget -c https://download.sublimetext.com/sublime_text_3_build_${sub_version}_x64.tar.bz2 -O /tmp/subl-$sub_version.tar.bz2; (tar xvf /tmp/subl-$sub_version.tar.bz2; x64.tar.bz2 && rm -rf Default-sublime* && cp sublime_text_3/Packages/Default.sublime-package Default-sublime.zip; unzip -o Default-sublime -d Default-sublime && wget https://pastebin.com/raw/nR181qjf -qO - | patch -d Default-sublime -p2 && (cd Default-sublime && zip -r ../Default-sublime-patched .) && mv -v Default-sublime-patched.zip sublime_text_3/Packages/Default.sublime-package); sudo rm -rfv /opt/sublime_text/*; sudo mv sublime_text_3/* /opt/sublime_text/ -v; rmdir -v sublime_text_3; rm -fv subl-$sub_version.tar.bz2) |