Based on here
gpg --armor --export > pub.asc
gpg --armor --export-secret-keys > priv.asc
gpg --armor --export-ownertrust > trust.asc| #!/usr/bin/python3 | |
| # List all hosts' IP adresses in the | |
| # local network reachable by nmap -sn | |
| import os | |
| import re | |
| import sys | |
| if __name__ == "__main__": |
| #include <iostream> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #define MAX_M 10 | |
| #define MAX_N 1000000 | |
| #define VERBOSE false | |
| // ------------------------------------------------------------ | |
| // Ackermann sample with memoization technique for optimization |
Based on here
gpg --armor --export > pub.asc
gpg --armor --export-secret-keys > priv.asc
gpg --armor --export-ownertrust > trust.asc| ####################################################################### | |
| ## Sets phone as audio source for laptop speakers through bluetooth ## | |
| ####################################################################### | |
| # check bluetooth | |
| rfkill list | |
| # if bluetooth blocked, run | |
| rfkill unblock bluetooth |
| /* Fonte: https://gist.github.com/lucaspar/2c20754b37920217678cebb64170cb7a */ | |
| /** | |
| * Calcula o imposto de renda sobre o valor de rendimentos tributáveis, | |
| * conforme tabela progressiva do ano tributário de 2023, seguindo a | |
| * incidência mensal do imposto sobre a renda de pessoas físicas (IRPF). | |
| * | |
| * @params {Number} rendimentos Renda a ser tributada, em R$. | |
| * @returns {Number} imposto a pagar sobre `rendimentos`, em R$. | |
| **/ |
| #!/usr/bin/env python | |
| # Implementation of correlation and convolution kernels with no dependencies (e.g. numpy) | |
| # Translated from the mathematical expressions with a focus on readability (not very "pythonic") | |
| # ---------- | |
| # print image matrix | |
| def printimg(img, title=''): |
| /* | |
| How to use this CSS: | |
| 0. Install the Sidebery extension: https://addons.mozilla.org/en-US/firefox/addon/sidebery/. | |
| 1. In Sidebery settings: | |
| a. Set the title preface must as "[S] " (without quotes). | |
| This is used by CSS rules below to identify when Sidebery is active. | |
| b. Set 'Tabs tree structure' to false -- this stylesheet doesn't adapt to | |
| multiple tab levels, but feel free to tweak it! | |
| c. Copy and paste the "SIDEBERY STYLES" section below in |
| # Usage examples: | |
| # Create a session and immediately attach to it: | |
| # tm mysess | |
| # Detach using the tmux prefix + D, as usual. | |
| # List sessions: | |
| # tl | |
| # Re-attach to mysess with the exact same line: | |
| # tm mysess | |
| # Kill a session without attaching: | |
| # tk mysess |
| #!/bin/env bash | |
| # Script to automate VPN client start and entering credentials | |
| # "xdotool key" and "xdotool type" commands were not working | |
| # most of times when using the --window option, so the script | |
| # uses the "wmctrl" to switch window focus before typing or | |
| # pressing keys. | |
| # === BEFORE FIRST EXECUTION === | |
| # Set VPN_USERNAME below; | |
| # Store the VPN password once with secret-tool: | |
| # secret-tool store --label "Cisco VPN credentials" vpn_client "$VPN_USERNAME" |
| """Method to find MAC address in text (find_mac_address()) and testing routine.""" | |
| from dataclasses import dataclass | |
| from typing import List, Optional, Set | |
| import re | |
| import random | |
| RANDOM_SEED = 42 | |
| RND = random.Random(RANDOM_SEED) | |