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 / noip.sh
Last active May 3, 2024 03:58
This Bash script updates a Dynamic DNS hostname using the 'noip-duc' command with preset parameters.
#!/bin/bash
# By Computer Science Engineer: Felipe Alfonso González
# Github.com/felipealfonsog
# Define command parameters
hostname="server.ddns.net"
username="......"
password="......"
@felipealfonsog
felipealfonsog / netctrl.sh
Last active May 10, 2024 00:31
NetCtrl is a script to remotely manage multiple machines on your local network. (For macOS Intel/Apple Silicon & Linux Arch / Debian)
#!/bin/bash
# Function to display a welcome message
welcome_message() {
echo "Welcome to NetCtrl!"
echo "NetCtrl is a script to remotely manage multiple machines on your local network."
echo "By computer science engineer Felipe Alfonso González - GitHub.com/felipealfonsog"
echo "Let's get started."
echo
}
[settings]
debug = false
hidefilenames = false
ignore =
COMMIT_EDITMSG$
PULLREQ_EDITMSG$
MERGE_MSG$
TAG_EDITMSG$
api_key=waka_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@felipealfonsog
felipealfonsog / arch-key-reset.sh
Last active March 30, 2024 04:59
Script to fix invalid PGP fail and transaction fail issue in Arch Linux
#!/bin/bash
# Script to fix invalid PGP fail and transaction fail issue in Arch Linux
# Computer Science Engineer: Felipe Alfonso González
# Github: https://github.com/felipealfonsog
# Email: f.alfonso@res-ear.ch
# BSD 3-Clause License
echo "Welcome to the Arch Linux PGP key reset script!"
echo "This script will reset all pacman keys to solve the problem."
#!/bin/bash
gpg --check-trustdb 2>&1| grep 'not found' | awk '{print $8}' >bad-keys.txt
gpg --export-ownertrust > ownertrust-gpg.txt
mv ~/.gnupg/trustdb.gpg ~/.gnupg/trustdb.gpg-broken
for KEY in `cat bad-keys.txt` ; do sed -i "/$KEY/d" ownertrust-gpg.txt ; done
gpg --import-ownertrust ownertrust-gpg.txt
rm bad-keys.txt ownertrust-gpg.txt
@felipealfonsog
felipealfonsog / gitcheck.sh
Last active March 27, 2024 03:48
"Gitcheck," checks for repositories within a directory that require actions, such as adding files or committing changes.
#!/bin/bash
################################################################################
# Script: gitcheck #
# Description: Script to check for repositories needing actions. #
# Created by: Felipe Alfonso González - github.com/felipealfonsog - #
# f.alfonso@res-ear.ch #
# License: BSD 3-Clause #
################################################################################
@felipealfonsog
felipealfonsog / system.sh
Last active April 25, 2024 08:19
This Bash script allows users to easily shutdown, suspend, or reboot their system via a simple menu interface.
#!/bin/bash
# Action Script
# Author: Felipe Alfonso González
# GitHub: github.com/felipealfonsog
# Contact: f.alfonso@res-ear.ch
# License: BSD 3-Clause License
# Function to display the options menu
display_menu() {
@felipealfonsog
felipealfonsog / ca-certificates.crt
Created March 18, 2024 15:19
This is a bundle of X.509 certificates of public Certificate Authorities (CA).
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Thu Dec 9 22:21:11 2021 GMT
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
##
@felipealfonsog
felipealfonsog / ca-bundle.crt
Last active March 18, 2024 15:42
ca-bundle The Mozilla CA bundle extracted and converted to PEM at regular intervals. See the PEM file itself for the actual date of the latest Mozilla source change that is included in converted file. Github: https://github.com/bagder/ca-bundle
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Mon Mar 11 15:15:21 2024 GMT
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
##
@felipealfonsog
felipealfonsog / ca-certificates.sh
Last active March 21, 2024 16:42
Update ca-certificates.crt
#!/usr/bin/env bash
#=================================================
# https://github.com/P3TERX/ca-certificates.crt
# Description: Update ca-certificates.crt
# Version: 1.1
# Lisence: MIT
# Author: P3TERX
# Blog: https://p3terx.com
#=================================================
# This package should be installed in: /etc/ssl/certs