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,
[
{
"ispb": "00000000",
"nome_simples": "BCO DO BRASIL S.A.",
"codigo": "001",
"participa_da_compe": "Sim",
"acesso_principal": "RSFN",
"nome": "Banco do Brasil S.A.",
"inicio_da_operacao": "22/04/2002"
},
#!/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); }'
@wallacesilva
wallacesilva / dicas-devcaveman-video-i3-diolinux
Last active August 2, 2018 14:29
Lista de programas minimal pra usar com o i3 - Linux Otimizado
Gestor de arquivos *Ranger* (melhor de todos),
Terminal *URxvt*,
editor *NeoVim*,
*Nitrogen* para wallpaper,
*Rofi* é melhor que Dmenu,
*Polybar* é melhor que i3blocks e i3status,
*Pulseaudio* melhor que Alsa,
*ArandR* para configurar monitor,
player de música *Mocp*,
player de vídeo *VLC*,
@wallacesilva
wallacesilva / resize window linux x11
Created June 28, 2018 17:47
Resize window active/focused with this script - [INCOMPLETE]
#!/bin/bash
# Wallace Silva - wallacesilva.com
dothis=true
toW=720
toH=560
nowW=0
nowH=0
increment=1
[
"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 / MySQLPDO_Lumine
Created March 13, 2018 17:28
Driver to Lumine PHP connect mysql with PDO
<?php
/**
* Conexao com MySQL via PDO
* @author Wallace Silva
* @link http://www.hufersil.com.br
* @package Lumine_Connection
*/
Lumine::load('Connection_AbstractConnection');