Skip to content

Instantly share code, notes, and snippets.

View serrasqueiro's full-sized avatar
🎯
Focusing

Henrique serrasqueiro

🎯
Focusing
View GitHub Profile

Let's try a more systematic approach to generate words that might match. I'll use a broader set of common English words and iterate through them to find one that, when encoded, includes the @ symbol.

Here's an updated script that uses a larger set of words:

import base64
from english_words import get_english_words_set

# Define your custom Base32 alphabet
@serrasqueiro
serrasqueiro / dirlist.py
Last active October 7, 2024 08:36
using scan
#!/usr/bin/env python
""" Module dirlist.py
Lists directory entries, and sorts them
"""
import sys
import os
@serrasqueiro
serrasqueiro / convert_youtube_watch_url.md
Last active October 6, 2024 17:22
Playing around Youtube url (12-base64) Python

Playing around Youtube URL

Youtube URLs are 11 (or 12?) chars written in safe-URL-base64 alphabet.

  1. ten = [chr(ord('0')+val) for val in range(0, 10)]
  2. t23 = [chr(ord('a')+val) for val in range(0, 26)]
  3. t46 = [chr(ord('A')+val) for val in range(0, 26)] + t23
  4. ids = ten + t46 + ["-", "_"] So it's basically the (10) digits, and 52 letters, plus a dash and an underscore character, this differs from the one at RFC-4648:

Sample

Stationary Satellites

  1. (here) NOAA gov GOES

GOES East Full Disk (band 1)

  1. (here) GOES-East Full Disk - Band 1
    • 25 hour loop - 150 images - 10 minute update
#!/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.