Skip to content

Instantly share code, notes, and snippets.

View felipealfonsog's full-sized avatar
🧳
Working from home

Felipe Alfonso González felipealfonsog

🧳
Working from home
View GitHub Profile
@felipealfonsog
felipealfonsog / connman-manager-helper.sh
Created June 6, 2026 22:31
ConnMan CLI Manager for Arch Linux
#!/bin/bash
# Colors for a more user-friendly interface
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m' # No color
printf "${BLUE}=== ConnMan Manager for Arch Linux ===${NC}\n"
@felipealfonsog
felipealfonsog / nm-helper.sh
Last active June 6, 2026 22:29
NetworkManager CLI Manager for Arch Linux
#!/bin/bash
# Colors for a more user-friendly interface
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m' # No color
# Ensure it runs as a regular user, using sudo only when required
#!/usr/bin/env bash
set -euo pipefail
REAL_BIN="/usr/bin/onedrive"
WRAPPER="$HOME/.local/bin/onedrive"
CONFIG_DIR="$HOME/.config/onedrive"
CONFIG_FILE="$CONFIG_DIR/config"
SYNC_DIR="$HOME/OneDrive"
SERVICE_DIR="$HOME/.config/systemd/user"
SERVICE_FILE="$SERVICE_DIR/onedrive-safe.service"
@felipealfonsog
felipealfonsog / install-dropbox-linux.sh
Last active May 16, 2026 13:19
Install Dropbox as a service
#!/usr/bin/env bash
set -euo pipefail
WRAPPER="$HOME/.local/bin/dropbox"
DROPBOXD="$HOME/.dropbox-dist/dropboxd"
DROPBOX_CLI="$HOME/.local/lib/dropbox/dropbox.py"
SERVICE_DIR="$HOME/.config/systemd/user"
SERVICE="$SERVICE_DIR/dropbox.service"
install_deps() {
@felipealfonsog
felipealfonsog / img2svg_cli.sh
Created March 19, 2026 21:24
IMG -> SVG CLI (Portable) - on macOS and Linux
#!/usr/bin/env bash
set -u
trap 'echo; echo "[EXIT] Interrupted."; exit 0' SIGINT
color() {
case "$1" in
red) printf '\033[0;31m%s\033[0m\n' "$2" ;;
green) printf '\033[0;32m%s\033[0m\n' "$2" ;;
@felipealfonsog
felipealfonsog / wayland-ozone-doctor.sh
Created January 25, 2026 10:37
A minimal, manual healthcheck and stabilization tool for Chromium/Electron Wayland issues on Arch KDE.
#!/usr/bin/env bash
set -euo pipefail
# wayland-ozone-doctor - v 2
# Manual healthcheck + repair for Chromium/Electron Wayland resize/compositor issues (Arch/KDE).
# Commands:
# - check : short headless Wayland probe (colors + spinner)
# - fix : apply max-stability configs (force X11) + write per-app flags files (best-effort)
# - fix-wrap : create per-app wrappers in ~/.local/bin (strongest per-app enforcement)
# - install : self-install to ~/.local/bin/wayland-ozone-doctor
@felipealfonsog
felipealfonsog / WatchesOps-Howto.txt
Last active January 14, 2026 08:01
TimeOps / WatchOps — atomic time drift analytics
nano watchops-v2.sh
chmod +x watchops-v2.sh
./watchops-v2.sh menu
sudo pacman -S libnewt dialog
brew install newt dialog
./watchops-v2.sh add-watch "LivingRoom-Japan" quartz 5 when_exceeds "Reloj grande living"
@felipealfonsog
felipealfonsog / fix-blackarch-python.sh
Created January 13, 2026 12:25
Fix Python + Blackarch utils deployment and installation
sudo tee /usr/local/bin/fix-osint-python >/dev/null <<'EOF'
#!/usr/bin/env bash
sudo cp -an /usr/lib/python3.13/site-packages/* /usr/lib/python3.14/site-packages/ 2>/dev/null || true
echo "[OK] Synced python3.13 site-packages -> python3.14"
EOF
sudo chmod +x /usr/local/bin/fix-osint-python
@felipealfonsog
felipealfonsog / wakatime-cli.py
Created January 8, 2026 07:31
Wakatime Cli - Python Version
# -*- coding: utf-8 -*-
import contextlib
import json
import os
import platform
import re
import shutil
import ssl
@felipealfonsog
felipealfonsog / fix-flutter.sh
Created October 24, 2025 22:04
This script fully removes conflicting Flutter and Dart packages, cleans caches, installs flutter-bin from AUR, adds the user to the flutter group, adjusts permissions, and verifies installation. It ensures a clean, conflict-free Flutter environment on Arch Linux.
#!/usr/bin/env bash
set -e
echo "=== Clean and safe Flutter-Bin installation ==="
# Function to remove packages if installed
remove_if_installed() {
for pkg in "$@"; do
if pacman -Qi "$pkg" &>/dev/null || yay -Qi "$pkg" &>/dev/null; then
echo "-> Removing conflicting package: $pkg"