Skip to content

Instantly share code, notes, and snippets.

View Fuabioo's full-sized avatar
🎱
sudo rm -r /*

Fabio Mora Fuabioo

🎱
sudo rm -r /*
View GitHub Profile
@Fuabioo
Fuabioo / settings.local.json
Created July 14, 2025 20:24
Example Claude Code settings to deny git branch deletions
{
"permissions": {
"allow": [
"Bash(go build:*)",
"...",
"Bash(git checkout:*)",
"Bash(git branch:*)",
"Bash(git merge:*)",
"Bash(git commit:*)",
"Bash(git push:*)",
@Fuabioo
Fuabioo / split-natural-language-lists-in-spanish.go
Created May 28, 2025 01:48
An example on how to split a list string expressed in natural language in spanish in golang
package main
import (
"fmt"
"strings"
)
func parseSpanishList(input string) []string {
input = strings.TrimSpace(input)
parts := strings.Split(input, " y ")
@Fuabioo
Fuabioo / fibonacci-demo.go
Created May 8, 2025 17:31
Fibonacci sequence demo
package main
import "fmt"
func fibonacci(n int) int {
f := make([]int, n+2)
f[0], f[1] = 0, 1
for i := 2; i <= n; i++ {
f[i] = f[i-1] + f[i-2]
}
@Fuabioo
Fuabioo / to-fav-icon.sh
Created April 27, 2025 23:20
Shell script to generate a favicon in linux using ImageMagick
#!/bin/bash
# exit on most errors
set -e
function to_fav() {
if [ $# -eq 0 ]; then
echo "Usage: to_fav <image_file>"
exit 1
fi