Skip to content

Instantly share code, notes, and snippets.

View serrasqueiro's full-sized avatar
🎯
Focusing

Henrique serrasqueiro

🎯
Focusing
View GitHub Profile
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
# subnet.py (c)2024 Henrique Moreira
"""
Dumps the current IP addressses from interfaces as required
"""
# pylint: disable=missing-docstring, too-many-locals

chatGPT portuga

Sobre Fenómenos Sísmicos (FS)

  1. (here)
How to kill the master branch in git
# replacing the master branch name in remote server
henrique@ludo:~/public> git push origin main:master -f
# then in a clean repo:
git push origin --delete master
At server, at "bare" repo (created formerly with 'git init --bare'):
- do `git branch` and see where '*' (star) is.
@serrasqueiro
serrasqueiro / Linux_trivia.md
Created August 17, 2024 15:50
Linux, trivia stuff !

Linux Welcome message(s)

When you login to an ssh or in the console of a Linux machine, you will see often Have a lot of fun... as a welcome message.

  • at openSUSE this is at /usr/lib/motd.d/welcome
  • you can tailor it as you please.

man motd is your friend, or otherwise the man motd web page from linux.die here:

  • in openSUSE you get just the aforementioned file;
  • if you put one more file, e.g. /etc/motd, that file is read and shown before the welcome message;
    • so, in this example, two messages would be shown.

Installing Python packages

As a regular (non-root) Linux user, I wanted to install GitPython, which allows me to play with GIT using Python scripting. The command pip install GitPython yield the following error:

  • error: externally-managed-environment Then explaining...
If you wish to install a non-rpm packaged Python package,
    create a virtual environment using python3.11 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip

Adicionar dinheiro com multibanco

  1. (here) paypal.com/.../money/
  2. (here) será redirecionado para aqui
    • Example: Entidade nnnnn, Referencia nnn nnn nnn
O valor mínimo de carregamento é de €10,00 EUR e o máximo é de €1.000,00 EUR a cada 24h.
O carregamento deve ser realizado através de uma conta/ cartão em nome do titular da conta PayPal recebedora.
Este NÃO é um método de pagamento e os usuários NÃO estão autorizados a compartilhar estas informações para receber carregamentos de terceiros.

Installing GitPython

Using openSUSE, and avoiding the following error:

  • error: externally-managed-environment
henri@sena:~> pip3 install --break-system-packages GitPython
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: GitPython in ./.local/lib/python3.11/site-packages (3.1.43)
Requirement already satisfied: gitdb<5,>=4.0.1 in ./.local/lib/python3.11/site-packages (from GitPython) (4.0.11)
Requirement already satisfied: smmap&lt;6,&gt;=3.0.1 in ./.local/lib/python3.11/site-packages (from gitdb&lt;5,&gt;=4.0.1-&gt;GitPython) (5.0.1)
@serrasqueiro
serrasqueiro / mobile_phone_regexp.md
Last active June 18, 2024 15:36
regexp de telefones

Mobile phones, sample

  1. (here) regex101 - sample
    • ^(\+\d{1,3}\s?)?\(?(\d{2,3})\)?[\s.-]?(\d{3}[\s.-]?\d{4})$
    • example: +1 (508) 3334444
      • 0-16: +1 (508) 3334444
      • 0-3 +1 4-7 508
      • 9-16 3334444

Hints - vCard formatting

  • vCard format (.vcf)

e-redes Iluminação Pública

  1. (here) e-redes - comunicar candeeiro de iluminação pública apagado
Title: SEAL | Still Love Remains | Live in 2005
SEAL | Still Love Remains
Live at Altes Kesselhaus, Düsseldorf
June 2005
The song was originally included in the studio album "Human Being" (1998), produced by Trevor Horn and arranged by Wil Malone.
U.K. pop sensation Seal has become notorious for taking extended breaks between albums (usually up to four years).