Skip to content

Instantly share code, notes, and snippets.

View alexrios's full-sized avatar
🦎
Zigging around

Alex Rios alexrios

🦎
Zigging around
View GitHub Profile
@alexrios
alexrios / fish.txt
Created August 6, 2025 21:42
fish on macos
brew install fish
echo /opt/homebrew/bin/fish | sudo tee -a /etc/shells
chsh -s /opt/homebrew/bin/fish
fish_add_path "/opt/homebrew/bin/"
fish_update_completions
@alexrios
alexrios / cciterator.go
Created August 3, 2025 22:32
Iterator-fed worker pool
func ProcessConcurrently[T any](
input iter.Seq[T],
workerCount int,
processor func(T) error,
) error {
jobs := make(chan T, workerCount)
errors := make(chan error, workerCount)
// Start worker goroutines
var wg sync.WaitGroup
@alexrios
alexrios / 45438-2025-ptbr.txt
Created April 11, 2025 14:45
45438-2025 "Network security technology artificial intelligence generated synthetic content identification method" PT-BR
## Página 1
ICS 35.030
CCS L 80
Norma Nacional da República Popular da China
GB 45438—2025
Tecnologia de Segurança Cibernética
Método de Identificação de Conteúdo Gerado por Inteligência Artificial
@alexrios
alexrios / RE: Why Go Should Sometimes Be a No-Go.md
Last active February 3, 2025 00:39
My take on the post "Why Go Should Sometimes Be a No-Go"

Go has done what most programming languages aspire to: spark emotionally charged debates. Let’s walk through the arguments and see what’s really being said.

1. Go Is Boring, and That’s Not Good

The author laments Go’s simplicity, equating it with boredom. One has to wonder: is the author looking for a programming language or a theme park? It’s almost as if the lack of flashy syntax and endless ways to do the same thing (read: Java’s 75 ways to write a loop) has robbed them of the joy of feeling “clever.”

What really shines through here is a deep yearning for glue code—the kind that stitches together massive, overly abstracted frameworks where the “fun” lies in deciphering dependency trees and watching IDEs buckle under their own weight. The thing is, Go’s “boring” design is what makes it productive. One way to loop? Great! Let’s loop efficiently instead of philosophizing over whether we should map, reduce, or just throw a lambd

wget -P ~/.local/share/fonts https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/JetBrainsMono.zip \
&& cd ~/.local/share/fonts \
&& unzip JetBrainsMono.zip \
&& rm JetBrainsMono.zip \
&& fc-cache -fv
# Run with elevated privileges
# If you have Connect Wise Control installed, remove it. IT organizations are likely to install it (or similar tool) if they feel the need for Netskope clients.
# RE: https://saputra.org/threads/remove-screenconnect-or-connectwise-control-from-windows-mac-linux.45/
function remove_cswincom() {
thumbprint=$(ls /Library/LaunchAgents/connectwisecontrol-* | head -1 | awk -F- '{print $2}')
# Stop the ConnectWiseControl Client service
launchctl unload /Library/LaunchAgents/connectwisecontrol-${thumbprint}-onlogin.plist
# Delete the service definitions
rm -f /Library/LaunchAgents/connectwisecontrol-${thumbprint}-*.plist
@alexrios
alexrios / install_flipt.sh
Created January 2, 2024 20:41
Installing flipt from releases
#!/bin/bash
# Set default values if not already set
: ${FLIPT_VERSION:="1.34.0"}
: ${ARCH:="linux_x86_64"}
# Check if the script is running as root (sudo)
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root. Please use sudo."
exit 1
@alexrios
alexrios / shell.nix
Created December 29, 2023 19:29
nix shell for OpenAI Whisper
{ pkgs ? import <nixpkgs> {}} :
pkgs.mkShell {
buildInputs = [
pkgs.python3
pkgs.poetry
pkgs.python311Packages.torch
pkgs.ffmpeg_5-full
pkgs.openai-whisper
];
}
@alexrios
alexrios / text-generation-webui.txt
Created July 28, 2023 02:04
Instructions to use any LLM model locally
# this tutorial assumes conda and git are both installed on your computer
conda create -n tg python=3.10.9
conda activate tg
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
git clone https://github.com/oobabooga/text-generation-webui.git
cd text-generation-webui
pip install -r requirements.txt
# GPU only:
# this tutorial assumes conda and git are both installed on your computer
conda create -n tg python=3.10.9
conda activate tg
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
git clone https://github.com/oobabooga/text-generation-webui.git
cd text-generation-webui
pip install -r requirements.txt
# GPU only: