Skip to content

Instantly share code, notes, and snippets.

View serrasqueiro's full-sized avatar
🎯
Focusing

Henrique serrasqueiro

🎯
Focusing
View GitHub Profile

Hash Identifiers Lengths

| Algoritmo / ID | Bits | Nibbles | Hex chars |
|----------------|------|---------|-----------|
| MD5            | 128  | 32      | 32        |
| Gist ID        | 128  | 32      | 32        |
| SHA‑1          | 160  | 40      | 40        |
| UUID v4        | 128  | 32      | 32        |
@serrasqueiro
serrasqueiro / mytitlecase.py
Last active April 11, 2026 10:45
Dictionary for Title case
# Install the library first:
# pip install titlecase
from titlecase import titlecase
def format_title(text: str) -> str:
return titlecase(text)
if __name__ == "__main__":
raw = "lifetime of surprises"
""" downplaylists.py
Downloads playlists found at remote link into a fixed dir!
"""
import sys
import os
import re
import requests
@serrasqueiro
serrasqueiro / calao.md
Last active February 14, 2026 20:26
dicionario de calão

Dicionário de calão

  1. Retirado daqui (here) dicionario html - Universidade do Minho
    • (here) Folder calao
    • dicionario.pdf contem o mesmo em formato mais interessante/ literario do que o HTML
  2. José João A. G. Dias de Almeida, (here) - página genérica (email: jj@di.uminho.pt)
@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 March 29, 2026 16:30
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."