Skip to content

Instantly share code, notes, and snippets.

@erral
erral / handy-eu.md
Last active October 26, 2026 15:00
How to Run Custom Basque Speech-to-Text Models in Handy on Linux (Wayland)

Nola erabili euskarazko neurrira egindako ahots-ereduak Handy-n Linux-en (Wayland)

Handy kode irekiko ahotsa testu bihurtzeko (STT) aplikazio lokala da, transcribe.cpp motorrak bultzatua. Nahiz eta ingelesezko eta eredu eleanitz estandarrak ekarri, neurrira doitutako ereduak erabil daitezke bertan —adibidez, euskarazko Itzune Parakeet TDT eredua— guztiz konexiorik gabe (offline).

Gida honetan azaltzen da nola bihurtu .nemo fitxategi bat GGUF formatura, nola konfiguratu Wayland-en idazketa-simulazioa ydotool bidez, nola ezarri sistema mailako laster-tekla global bat, eta nola bermatu bateragarritasuna Ghostty bezalako terminal-emulatzaileekin.


1. Sistemako menpekotasunak instalatu APT bidez

@erral
erral / README.md
Created June 26, 2026 06:26
plone.namedfile Write Path Performance Checker — SHA-256 hash overhead vs old behavior

plone.namedfile Write Path — Performance Checker

Two benchmarks to evaluate the performance impact of the SHA-256 hashing change on NamedFile/NamedBlobFile write operations.

Files

  • write_perf.py — microbenchmark for NamedFile._setData latency
  • test_perf_patch.py — integration benchmark for full-stack PATCH latency
#! /usr/bin/env python
# -*- coding: utf-8 -*-
""" install pdftoppm first (use your package manager) """
import os
def main(start="."):
for dirpath, dirnames, filenames in os.walk(start):
for filename in filenames:
if filename.endswith('pdf') and not filename.startswith('.') and f'{filename}.jpg' not in filenames:
os.system(f'pdftoppm -jpeg -f 1 -l 1 "{dirpath}/{filename}" > "{dirpath}/{filename}.jpg"')
@erral
erral / index.md
Last active October 13, 2022 04:22
How to deploy Volto sites automatically in non-docker scenarios
@erral
erral / jabetza-pribatutik-ezagutza-kolektibora.md
Last active September 28, 2022 07:50
Jabetza pribatutik ezagutza kolektibora: lizentziei buruzko mahaingurua
@erral
erral / docker-compose.yml
Last active January 9, 2023 11:03
mysql eta adminer interfazea martxan jartzeko docker-compose.yml fitxategia
# copy this file to a folder and name it docker-compose.yml
# run the services with the following command:
#
# $ docker compose up
#
# You will have a mysql server running on 3306 and an adminer interface con 8081
#
# It will create a default databse called mydb and a username called mydb_user with password mydb_pass
# with permissions to manage the database
@erral
erral / Mailhog Bash Script (systemd)
Last active December 17, 2024 13:43
Mailhog setup with systemd. Copy and paste this to a terminal in your computer. It will start a MailHog server listening on port 25 and a web based interface listening on port 8025
#!/usr/bin/env bash
echo ">>> Installing Mailhog"
# Download binary from github
sudo wget --quiet -O /usr/local/bin/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
# Make it executable
sudo chmod +x /usr/local/bin/mailhog
@erral
erral / tg.py
Last active July 6, 2021 21:56 — forked from juananpe/tg.py
Telegram notifier
# Twutter: https://twitter.com/juanan/status/1363860121676353537
# pip install python-telegram-bot
# Haria desagertzen bada ere, hemen azalpena:
# 1) Si no lo has creado aún, crea tu bot usando @BotFather en Telegram y copia tu APITOKEN
# 2) Obtén un webhook de usar y tirar aquí: https://webhook.site Te asignará una URL aleatoria, guárdala
# 3) Asigna el webhook a tu bot (la URL de http://webhook.site) https://api.telegram.org/botAPITOKEN/setWebhook?url=https://webhook.site...
# 4) Copia este mini script python a tu home directory https://gist.github.com/juananpe/edee47d41ed16c0a00eb820e0135bed3
@erral
erral / update_jitsi_meet_translation_json.py
Last active June 21, 2021 07:09
Update jitsi-meet translation files with the new messages
# -*- coding: utf-8 -*-
"""
This script takes the main.json file, compares it with the json file provided
as a parameter and adds the missing keys to the provided file.
This way the language files can be updated without losing the existing translations.
The result of the script is a new file, this way the original file is left untouch.
"""
#!/usr/bin/python3.7
from git import Actor
from git import Repo
import datetime
import os
import time
import json
import requests