Skip to content

Instantly share code, notes, and snippets.

View Maikuh's full-sized avatar

Miguel Araujo Maikuh

View GitHub Profile
@Maikuh
Maikuh / notify.sh
Created May 10, 2026 01:49
Notify script that can be used in Claude's hooks (Notifications/Stop). Needs https://github.com/moltenbits/growlrrr but can be easily ported to a more well known solution like https://github.com/vjeantet/alerter
#!/bin/bash
space_info=""
repo_name=""
# Get git repository name
if git rev-parse --is-inside-work-tree &>/dev/null; then
repo_root=$(git rev-parse --show-toplevel 2>/dev/null)
if [ -n "$repo_root" ]; then
repo_name=$(basename "$repo_root")
@Maikuh
Maikuh / rnc-validator.js
Created August 6, 2021 16:01
Validate Dominican Republic's RNCs
function validateRNC (rnc = '') {
const baseRnc = [7, 9, 8, 6, 5, 4, 3, 2]
let suma = 0
let resto, verificador
if (rnc.trim().length != 9) return false
var digitos = rnc.trim().split('')
var digitoVerificador = parseInt(digitos[digitos.length - 1].toString())
@Maikuh
Maikuh / PopOS Fixes and Configs.md
Last active August 31, 2021 14:20
Fixes and Configurations I've made to my linux setup, according to my hardware

Fix the Front Jack Microphone/Line In volume sliders in GUIs changing both Volume and Boost/Gain

Make sure to backup the file before modifying, just in case

cd /usr/share/pulseaudio/alsa-mixer/paths
sudo cp analog-input-front-mic.conf analog-input-front-mic.conf.bak
sudo gedit analog-input-front-mic.conf

Note: if on a laptop, the file is probably analog-input-internal-mic.conf and analog-input-headset-mic.conf. The one above is for Desktops, specifically the front jack.

https://www.youtube.com/watch?v=JaMCxVWtW58 - BookList (Vanilla JS, LocalStorage, DOM manipulation)
https://www.youtube.com/watch?v=b8sUhU_eq3g - Todos (Vanilla JS, LocalStorage, DOM manipulation)
https://www.youtube.com/watch?v=G1eW3Oi6uoc - Filterable List (Vanilla JS, arrays)
https://www.youtube.com/watch?v=riDzcEQbX6k - Quiz App (Vanilla JS)
@Maikuh
Maikuh / cedula-validator.js
Created March 13, 2019 22:13
Cedula validator written in javascript. Returns true if cedula is valid, false otherwise.
const cedulaValidator = value => {
let vnTotal = 0;
let vcCedula = value.replace(/-/g, "");
let pLongCed = vcCedula.trim().length;
let digitoMult = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1];
if (pLongCed !== 11)
return false;
for (let vDig = 1; vDig <= pLongCed; vDig++) {
@Maikuh
Maikuh / xbindkeys MX Master Thumb Wheel settings
Last active February 23, 2019 05:43
Settings for xbindkeys (linux) that maps MX Master's Thumb Wheel to Volume Up/Down. Tested on Ubuntu. This goes into ~/.xbindkeysrc
# thumb wheel up => increase volume
"pactl -- set-sink-volume 0 +10%"
b:6
# thumb wheel down => lower volume
"pactl -- set-sink-volume 0 -10%"
b:7
public static bool validaCedula(string pCedula)
{
int vnTotal = 0;
string vcCedula = pCedula.Replace("-", "");
int pLongCed = vcCedula.Trim().Length;
int[] digitoMult = new int[11] { 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1 };
if (pLongCed < 11 || pLongCed > 11)
return false;