Skip to content

Instantly share code, notes, and snippets.

@fabiolimace
fabiolimace / README.md
Last active April 6, 2025 06:09
Scripts to find dead rules in `espeak-ng`'s `pt_rules`. Moved to https://github.com/fabiolimace/espeak-ng-playground

Scripts to find dead rules in espeak-ng's pt_rules

These scripts in this file can be used to find dead rules in espeak-ng's pt_rules, the rules file for Portuguese language.

Get the lists of words

First you need lists of words:

  • DELAS PB v2 (simple words) from Unitex-PB project;
  • DELAF PB v2 (simple words with Inflection) from Unitex-PB project;
@fabiolimace
fabiolimace / espeak-ng-say-list.sh
Last active October 9, 2024 01:17
espeak-ng-say-list.sh: A scritp that says a list of words, until you answer good or not for each one of them.
#!/bin/bash
#
# A scritp that says a list of words, until you answer good or not for each one of them.
#
# The answers are logged into a file called `espeak-ng-say-list.log`.
#
# Usage:
#
# espeak-ng-say-list.sh LIST [VOICE]
@fabiolimace
fabiolimace / plain-text-ledger.md
Last active October 6, 2024 01:54
Cookie-Jar Plain Text Ledger

Cookie-Jar Plain Text Ledger

This document describes a simple plain text ledger based on ledger-cli and cookie-jar format.

The goal of this document is to describe a bookkeeping format that is simple enough to be parsed with regular Unix tools such as Awk.

Cookie-jar format:

@fabiolimace
fabiolimace / virt-manager-export.sh
Last active September 23, 2024 18:04
Exports a virtual machine from VirtManager to a given directory.
#!/bin/bash
#
# Exports a virtual machine from VirtManager to a given directory.
#
# Usage:
#
# # how to export a virtual machine
# ./virt-manager-export.sh EXPORT_DIRECTORY VIRTUAL_MACHINE_NAME
#
@fabiolimace
fabiolimace / kvm_export_import.sh
Created September 16, 2024 09:11 — forked from KarthickSudhakar/kvm_export_import.sh
Bash script to import and export KVM virtual machine
#!/usr/bin/env bash
# ----------------------------------------------------------------------------------------------------
# AUTHOR : KARTHICK S
# PURPOSE : THIS SCRIPT WILL EXPORT/IMPORT THE CONFIG AND VM DISK.
#
# usage:
# export function will take care of exporting the necessary for all VM. Run as "<scriptname.sh> export"
# import function will take care of importing the necessary for all VM. Run as "<scriptname.sh> import"
#
@fabiolimace
fabiolimace / Share Host Folder with Guests in VirtManager.md
Last active September 15, 2024 14:35
Share Host Folder with Guests in VirtManager

Share Host Folder with Guests in VirtManager

In VirtManager, in "show virtual hardware details":

  1. In "Memory", check "Enable shared memory";
  2. Press the button "Add hardware";
  3. In "File system":
    • Driver: virtiofs
      • if an error blocks the vm boot, use "virtio-9p" here and use Type=9p in the file mnt-shared.mount.
@fabiolimace
fabiolimace / reader.sh
Last active February 2, 2025 16:22
Shows a text file page by page in intervals of N seconds.
#!/usr/bin/bash
#
# Shows a text file page by page in intervals of N seconds.
#
# If no page is given, it starts in the last page from history.
#
# Usage:
#
# ./reader.sh FILE [PAGE] [SECONDS]
@fabiolimace
fabiolimace / it-glossaries.txt
Last active August 15, 2024 16:22
IT Glossaries
https://techterms.com/
https://www.techopedia.com/dictionary
https://www.redhat.com/en/topics
https://azure.microsoft.com/en-us/resources/cloud-computing-dictionary/
https://en.wikipedia.org/wiki/Glossary_of_computer_science
https://en.wikipedia.org/wiki/Glossary_of_computer_hardware_terms
https://en.wikipedia.org/wiki/Glossary_of_computer_science
https://en.wikipedia.org/wiki/Glossary_of_Internet-related_terms
https://en.wikipedia.org/wiki/Glossary_of_backup_terms
@fabiolimace
fabiolimace / glossary-export.sh
Last active August 4, 2024 23:04
Search terms in NIST's Glossary at https://csrc.nist.gov/glossary
#!/usr/bin/bash
#
# Search terms in NIST's Glossary at https://csrc.nist.gov/glossary.
#
# The Glossary includes terminology from the final version of NIST's cybersecurity and privacy publications.
#
# The glosssary last updated on 2024-04-22 is bundled with this GIST in base64 format for file preservation.
#
# Usage:
@fabiolimace
fabiolimace / sysinfo.sh
Last active August 4, 2024 09:57
Show system Information from `/proc` directory
#!/bin/bash
awk -F":" 'NR == 1 {printf "os: %s", $1; next } NR == 2 {printf " %s", $1; next} NR == 3 {printf " %s\n", $1; exit}' /proc/sys/kernel/ostype /proc/sys/kernel/osrelease /proc/sys/kernel/arch;
awk -F: '/^(model name)/ { sub(/^[ ]+/,"",$2); printf "cpu: %s\n", $2; exit}' /proc/cpuinfo;
awk -F: '/^(MemTotal)/ {sub(/^[ ]+/,"",$2); printf "memory: %s\n", $2; exit}' /proc/meminfo;
awk -F":" '{printf "uptime: %dd %s\n", ($1/60/60/24), strftime("%T", $1, 1) ; exit}' /proc/uptime;
awk -F":" '{printf "hostname: %s\n", $1; exit}' /proc/sys/kernel/hostname;
awk -F":" '{printf "domain: %s\n", $1; exit}' /proc/sys/kernel/domainname;