View keybindings.json
/* 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
View xrandr-scale.sh
#!/bin/bash
export LANG=C
output=$1;
scale=$2;
if [ -n "$output" ] && ! (xrandr --listmonitors | grep -qw "$output"); then
echo "Invalid output: '$output'";
exit 1;
View gobject-override.c
/*
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>
View nextcloud-client-qt-shared.yaml
name: nextcloud-client
version: 2.2.4+git
icon: ../nextcloudtheme/theme/colored/Nextcloud-icon.svg
summary: Nextcloud Desktop Client
description: |
The Nextcloud Desktop Client is a tool to synchronize files from Nextcloud
Server with your computer.
grade: stable
confinement: strict
View x-qtbuilder.py
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Author: Marco Trevisan <marco@ubuntu.com>
# 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,
View sublime-install.sh
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)
View verification.txt
Verifying that "trevinho.id" is my Blockstack ID. https://onename.com/trevinho
View snapcraft-config-generator.py
#!/usr/bin/python3
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Generates .snapcraft/snapcraft.cfg credentials to upload to the store
#
# Copyright (C) 2017 Marco Trevisan <marco@ubuntu.com>
#
# 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.
View pulse-audio-hdmi-switch.sh
#!/bin/bash
USER_NAME=$(who | grep tty$(sudo fgconsole) | cut -f1 -d' ')
USER_ID=$(id -u "$USER_NAME")
HDMI_STATUS=$(</sys/class/drm/card0/*HDMI*/status)
HDMI_CARD="pci-0000_00_03.0"
HDMI_PROFILE="hdmi-stereo-extra1"
INTERNAL_CARD="pci-0000_00_1b.0"
View .gitconfig
[alias]
added = diff --cached
br = branch
ci = commit
co = checkout
contains = branch --contains
di = diff
diffc = diff --cached
discard = checkout --
distclean = "clean -dxfi"