Skip to content

Instantly share code, notes, and snippets.

View wallacesilva's full-sized avatar
🌎
Working Remotely

Wallace Silva wallacesilva

🌎
Working Remotely
View GitHub Profile
@wallacesilva
wallacesilva / keyboard.md
Created January 10, 2026 22:50 — forked from ericdouglas/keyboard.md
Cedilla under C (ç) in 'US international' keyboard layout in Linux

Add English (US, alt. intl.)

It's because the cedilla module isn't loaded by default when the locale is set to en, so you have to change the configuration files for gtk to add them:

  1. Edit configuration files:
sudo vim /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache

sudo vim /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache
@wallacesilva
wallacesilva / pg_dumb.py
Created August 7, 2020 22:03
Postgresql pg_dump parser
import argparse
from urllib.parse import urlparse
def parse_command(database_url, exclude_tables):
parsed_url = urlparse(database_url)
parsed_data = {
'hostname': parsed_url.hostname,
'username': parsed_url.username,
'password': parsed_url.password,
#!/usr/bin/perl
# usage:
#
# git log --author="Sebastian Riedel" --format="%H %ai" | perl script.pl
#
use strict;
use warnings FATAL => 'all';
use utf8;
@wallacesilva
wallacesilva / gist:ddb90b1ad6ac848f1c1c5e639d4855f8
Created July 18, 2019 13:32 — forked from bessarabov/gist:674ea13c77fc8128f24b5e3f53b7f094
One-liner to generate data shown in post 'At what time of day does famous programmers work?' — https://ivan.bessarabov.com/blog/famous-programmers-work-time
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }'
[
"0161001",
"0161002",
"0161003",
"0161099",
"0162801",
"0162802",
"0162803",
"0162899",
"0163600",

/Providers

POST /Providers

  {
    id: "paulistana", // ID
    name: "Paulistana",
    standard: "ABRASF",
    version: "1.00",
    actions: [
@wallacesilva
wallacesilva / panel-alpha.sh
Created March 10, 2018 17:32 — forked from bharadwaj-raju/panel-alpha.sh
changes panel transparency depending on whether any window is maximized or not
#!/usr/bin/env bash
#-- CONFIGURATION
transparent_alpha=0
maximized_alpha=100
interval=0
#--
alpha_prop_list=()
for prop in $(xfconf-query -c xfce4-panel -p /panels -l); do