Skip to content

Instantly share code, notes, and snippets.

View tiagoad's full-sized avatar
🔨

Tiago tiagoad

🔨
View GitHub Profile
@tiagoad
tiagoad / push_to_talk.ahk
Last active August 5, 2021 21:49
A AutoHotKey script to implement push-to-talk at the Windows mixer level.
; ------------
; Push to talk
; ------------
;
; This AutoHotKey script implements push-to-talk at the Windows mixer level.
;
; The hotkey set by HOTKEY_TOGGLE will toggle between "Open" and "PTT" mode:
; - Open: Microphone is unmuted;
; - PTT: Microphone is only unmuted while HOTKEY_PTT is pressed.
;
@tiagoad
tiagoad / check-updates.sh
Last active January 13, 2025 12:51
Check updated golang direct dependencies in go module
go list -mod=mod -f '{{if and (not .Indirect) .Update}}{{.String}}{{end}}' -m -u all
@tiagoad
tiagoad / top-commands.sh
Created January 13, 2025 12:50
Top commands in bash/zsh history (Linux/Mac)
fc -ln 1 | sed 's/^\t //' | awk '{print $2}' | sort | uniq -c | sort -n
@tiagoad
tiagoad / nonprint.md
Created January 13, 2025 13:24
Script/command to replace non-printable characters with a placeholder in the format used by Sublime Text

Example:

Screenshot 2025-01-13 at 13 18 51

Add to .bashrc/.zshrc as an alias:

alias nonprint='perl -pe "use Term::ANSIColor; s/([^[:print:]\n])/colored(sprintf(\"<0x%02x>\", ord($1)), magenta)/ge"'

Use it as a script:

Summary of ANSI standards for ASCII terminals Joe Smith, 18-May-84
Contents:
1. Overview and Definitions
2. General rules for interpreting an ESCape Sequence
3. General rules for interpreting a Control Sequence
4. C0 and C1 control codes in numeric order
5. Two and three-character ESCape Sequences in numeric order
6. Control Sequences in numeric order
7. VT100 emulation requirements