Skip to content

Instantly share code, notes, and snippets.

View serrasqueiro's full-sized avatar
🎯
Focusing

Henrique serrasqueiro

🎯
Focusing
View GitHub Profile
@serrasqueiro
serrasqueiro / saldossimples.py
Last active January 11, 2026 19:07
ocultar saldos
#!/usr/bin/env python3
import sys
import re
def main():
""" Retira informacao desnecessaria;
masker = SaldoMasker(":", blanks_right=False) -> sem valor de saldo
... ("^", ...) -> descricao simplificada
"""
masker = SaldoMasker("^", blanks_right=False)
@serrasqueiro
serrasqueiro / .alias_addons-2
Last active January 5, 2026 12:58
Bash sourced script
# .alias_addons-2 -- H.Moreira
function short_git_list ()
{
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(refname:short)'
return $?
}
function git_checkout ()
{
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@serrasqueiro
serrasqueiro / LICENSE
Last active January 2, 2026 17:05
MIT license
MIT License
Copyright (c) 2026 Trisconta (Henrique Moreira)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
#!/bin/bash
#
# Elegant digital clock
usage ()
{
echo "Usage: $0 [-h|--help] [-w|--what]"; echo
echo "Launches an elegant digital xclock.
-w shows what font is the best, and what is used as default font."

Exemplo de factura gasolineira

PT513654739 (Tranquilo Planalto),

  1. 26litros, 1.784 eur/L,
  2. desconto vale Galp parceiro=3eur,
  3. usei tambem cartao continente, 0.15 eur/Litro (desconto adicional=3.90eur),
  4. ou seja, pague-se 43.38eur (e acumula-se 3.90eur) ~= 39.48 (em vez dos 46.38eur, ou seja, poupança de quase 7 euros em 46, ca. 15% de desconto)

VirtualBox configurations

C:\maquinas\myVM> grep HardDisk.uuid *.vbox
File myVM.vbox:
        <HardDisk uuid="{fdfb1a86-166d-4136-ac93-729a05b0d410}" location="myVM.vdi" format="VDI" type="Normal"/>
        <HardDisk uuid="{abfc2359-d897-46a0-96fd-3e25e3bf1080}" location="myVM_2_swap.vdi" format="VDI" type="Normal"/>
        <HardDisk uuid="{17544fb3-6834-41f8-a34b-604f5515ccf1}" location="myVM_3_psec.vdi" format="VDI" type="Normal"/>
        <HardDisk uuid="{cc6d693c-771d-4f8c-a49b-c5ea773cd327}" location="myVM4_home4.vdi" format="VDI" type="Normal"/>
[Event "Saint Louis Blitz 2017"]
[Site "Saint Louis USA"]
[Date "2017.08.18"]
[Round "12.3"]
[White "Caruana, Fabiano"]
[Black "Kasparov, Garry"]
[Result "0-1"]
[WhiteElo "2807"]
[BlackElo "2812"]
[ECO "B23"]
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
@serrasqueiro
serrasqueiro / hints_about_after.local.md
Last active December 6, 2025 14:19
damn openSUSE Armor!

Hints about after-local.service

Adding that:

myopenSUSEhost:~ # more /etc/init.d/after.local
#! /bin/sh
#
# Copyright (c) 2010 SuSE LINUX Products GmbH, Germany.  All rights reserved.
#
# Author: Werner Fink, 2010
#