Skip to content

Instantly share code, notes, and snippets.

@fabiolimace
fabiolimace / Date-Sorted ID.md
Created April 2, 2026 01:42
Date-Sorted ID

Date-Sorted ID

A Date-Sorted ID (DSID) is a 48-bit number composed of two components:

  • a 16-bit date.
  • a 32-bit random number.

DSIDs can be safely used in IEEE-754 floating-point data types, such as Number in Javascript.

@fabiolimace
fabiolimace / speech-dispatcher-espeak-ng.md
Created March 25, 2026 08:06
Speech Dispatcher with compiled eSpeak NG on Ubuntu 24.04

This document lists commands to setup speech-dispatcher with compiled eSpeak-NG on Ubuntu 24.04.

Uninstall eSpeak NG:

sudo apt remove espeak-ng espeak-ng-data

Clone eSpeak NG from Github:

@fabiolimace
fabiolimace / notification-parser.awk
Last active March 29, 2026 02:43
Notification Speaker
#!/usr/bin/awk -f
#
# Parses DBus Notifications
#
# DBus Protocol: https://specifications.freedesktop.org/notification/1.3/protocol.html
#
# Notification Structure:
# UINT32 org.freedesktop.Notifications.Notify (
# STRING app_name,
@fabiolimace
fabiolimace / notekeeper-html.awk
Last active January 3, 2026 02:35
Removed from Note Keeper (formerly APKM) at 02 jan 2026
#!/usr/bin/awk -f
@fabiolimace
fabiolimace / Formato de arquivo GZ.TAR.md
Last active November 24, 2025 06:27
Formato de arquivo GZ.TAR

Formato de arquivo GZ.TAR

O quê

Um arquivo gz.tar é um arquivo de fita cujos arquivos internos estão compactados individualmente.

Primeiro, os arquivos são compactados recursivamente dentro de um diretório. Depois disso, o arquivo de fita desse diretório é gerado.

@fabiolimace
fabiolimace / calibre-list-mobi-asin.sh
Last active November 24, 2025 03:30
List Amazon Book IDs of all ebooks in a Calibre Library
#!/bin/bash
#
# List all MOBI-ASIN codes extracted from OPF files.
#
# Usage
#
# calibre-list-mobi-asin.sh LIBRARY
#
@fabiolimace
fabiolimace / _etc_udev_rules.d_80-smartlink-mp3-player.rules
Last active November 5, 2025 20:36
Smartlink Technology - Genai MP3 Player - USB Mass Storage - YP3 - Not working on Ubuntu
@fabiolimace
fabiolimace / audiobook.sh
Last active October 27, 2025 08:45
Convert a ebook into an audiobook.
#!/bin/bash
#
# Convert a ebook into an audiobook.
#
# Input format: TXT
# Output format: MP3
#
# USAGE
#
@fabiolimace
fabiolimace / g1-rss-downloader.sh
Last active August 16, 2025 23:19
Este script baixa o RSS do site G1 da Globo.
#!/bin/bash
#
# Este script baixa o RSS do site G1 da Globo.
#
# Produz dois arquivos:
#
# 1. Um arquivo XML o conteúdo inalterado;
# 2. Um arquivo Record-Jar gerado a partir do XML.
#
@fabiolimace
fabiolimace / stdquote.js
Created March 27, 2025 10:22 — forked from thanpolas/stdquote.js
Normalize all UTF quotes in Javascript
/**
* Will normalize quotes in a given string. There are many variations of quotes
* in the unicode character set, this function attempts to convert any variation
* of quote to the standard Quotation Mark - U+0022 Standard Universal: "
*
* @param {string} str The string to normalize
* @return {string} Normalized string.
* @see https://unicode-table.com/en/sets/quotation-marks/
*/
helpers.stdQuote = (str) => {