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 / 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"
@felipealfonsog
felipealfonsog / install_latest_firefox_linux.sh
Last active October 8, 2025 09:49
Install latest version of Firefox on Linux in the menu
#!/bin/bash
# Detect the package manager
if command -v pacman &> /dev/null; then
PACKAGE_MANAGER="pacman"
INSTALL_CMD="sudo pacman -S --noconfirm"
elif command -v apt &> /dev/null; then
PACKAGE_MANAGER="apt"
INSTALL_CMD="sudo apt install -y"
elif command -v dnf &> /dev/null; then
@felipealfonsog
felipealfonsog / add_pacmanrepo.sh
Last active October 6, 2025 08:54
Arch Linux Bin repo generator script - for a personal server
#!/bin/bash
set -e
PACMAN_CONF="/etc/pacman.conf"
REPO_NAME="gnlz"
REPO_URL="https://gnlz.cl/repo/\$arch"
if grep -q "^\[$REPO_NAME\]" "$PACMAN_CONF"; then
echo ">> Repository [$REPO_NAME] already exists in $PACMAN_CONF"
else
@felipealfonsog
felipealfonsog / install_notedeck_menu_nostr.sh
Last active September 22, 2025 05:06
Installs NoteDeck in KDE Plasma’s Internet menu with a Nostr icon, updates caches, and makes it appear immediately—no sudo or restart required.
#!/bin/bash
set -euo pipefail
APP_NAME="NoteDeck"
EXEC_PATH="/usr/bin/notedeck"
ICON_URL="https://raw.githubusercontent.com/github/explore/refs/heads/main/topics/nostr/nostr.png"
ICON_DIR="$HOME/.local/share/icons/hicolor/256x256/apps"
ICON_PATH="$ICON_DIR/notedeck-nostr.png"
DESKTOP_DIR="$HOME/.local/share/applications"

Keybase proof

I hereby claim:

  • I am felipealfonsog on github.
  • I am felipealfonsog (https://keybase.io/felipealfonsog) on keybase.
  • I have a public key ASDo6wD-QmniHwAHF7--HdLHSNv6kJ3UIg4I9PCFC3CC-go

To claim this, I am signing this object:

@felipealfonsog
felipealfonsog / config.php-apache.sh
Created September 18, 2025 03:58
Apache, PHP, and MariaDB have been installed and configuration script
#!/bin/bash
# Actualizar sistema
sudo pacman -Syu --noconfirm
# Instalar Apache, PHP, módulos PHP y MariaDB
sudo pacman -S --noconfirm apache php php-apache mariadb
# Configurar Apache para PHP
sudo sed -i '/#LoadModule mpm_event_module modules\/mod_mpm_event.so/s/^#//' /etc/httpd/conf/httpd.conf
@felipealfonsog
felipealfonsog / disable_zram.sh
Created September 18, 2025 03:33
Fix Zram disabled and swapfile configured
#!/bin/bash
set -e
echo "🔧 Disabling zram swap..."
# 1. Turn off zram if active
if swapon --summary | grep -q zram0; then
echo "🛑 Turning off /dev/zram0 swap..."
sudo swapoff /dev/zram0 || echo "⚠️ Failed to swapoff /dev/zram0"
fi