Skip to content

Instantly share code, notes, and snippets.

View asapdotid's full-sized avatar

Asapdotid asapdotid

View GitHub Profile
@asapdotid
asapdotid / Tmuxinator-custom-config-readme.md
Last active September 9, 2025 04:18
Tmuxinator config

Tmuxinator custom config

Config location: /home/$USER/.config/tmuxinator

@asapdotid
asapdotid / fedora-rpm-list-and-remove.md
Last active May 25, 2025 14:21
How can I remove a .asc key from Fedora/Centos/Redhat

How can I remove a .asc key

You can list the keys with:

rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'

Then delete the key you want with:

rpm -e gpg-pubkey-...

@asapdotid
asapdotid / i3wm-hibernate.md
Created May 5, 2025 12:07
To disable sleep and hibernate in i3wm

To disable sleep and hibernate in i3wm

you can modify your system's power management settings, primarily using systemd. You can mask or disable the relevant systemd units to prevent suspend or hibernate actions. Additionally, you can adjust X.org's screen saver and power-saving settings using xset

Here's a more detailed breakdown:

1. Disable Sleep/Hibernate with Systemd:

Masking Units:

@asapdotid
asapdotid / ubuntu-update.md
Last active April 30, 2025 09:20
Update/Upgrade not working (because of phased updates)

Ubuntu - Update/Upgrade not working (because of phased updates)

If you want to permanently opt-in to all phased upgrades in the future, you can create a conf file so that you don't have to add a long command-option each time you issue apt upgrade.

sudo nano /etc/apt/apt.conf.d/30phased-upgrades

APT::Get::Always-Include-Phased-Updates "true";

sudo apt update && sudo apt upgrade -y

@asapdotid
asapdotid / aliases.sh
Last active June 22, 2025 15:08
SSH remotely into a server that is running a wireguard vpn client connection
#!/bin/bash
# IP Route over wireguard
alias ip:r:l="ip -o -4 route show"
alias ip:r:s="sudo ip route show"
alias ip:r:ssh="sudo ip rule add dport 22 ipproto tcp table main priority 123"
@asapdotid
asapdotid / arch_linux_disable-enable_hibernate.md
Last active March 6, 2025 08:42
[Arch Linux/ Manjaro HowTo] Disable / Turn off Hibernate completely!

Another possibility using systemctl

Disable hibernate:

sudo systemctl mask hibernate.target

Test

@asapdotid
asapdotid / cron-tmux-resurrect.sh
Last active February 21, 2025 08:06
Manage resurrect files
#!/bin/bash
# $HOME/.local/share/tmux/resurrect
# $HOME/.tmux/resurrect
0 12 * * * /usr/bin/find $HOME/.local/share/tmux/resurrect -name "*.txt" -type f -mtime +3 -exec rm -rf {} \; > /dev/null 2>&1
# OR
# 0 12 * * * /usr/bin/find $HOME/.tmux/resurrect -name "*.txt" -type f -mtime +3 -exec rm -rf {} \; > /dev/null 2>&1
@asapdotid
asapdotid / i3_wm_application_specific_rules.config
Created August 27, 2024 03:02 — forked from atomize/i3_wm_application_specific_rules.config
Rules for enabling floating on specific applications in i3wm
#### RULES FOR SPECIFIC APPLICATIONS ####
# from: http://www.linuxlusers.com/2012/12/24/i3-window-manager-tip-making-specific-applications-and-child-windows-open-in-floating-mode-or-with-other-custom-settings/
# by APPLICATION (WM_CLASS)
# Note: class is typically useful for applying custom settings to
# to entire applications, including child windows. If this
# isn't want you want see the ROLE section, below.
# Tip: To find out what these values might be run:
# xprop | grep -i 'class'
for_window [class="File-roller"] floating enable, border normal
for_window [class="Speedcrunch"] floating enable, border normal

XDG - Base Directory Specification

Directories

Base

The intended use-case for BaseDirectories is to query the paths of user-invisible standard directories that have been defined according to the conventions of the operating system the library is running on.

@asapdotid
asapdotid / README.md
Last active May 14, 2024 13:23
Fastfetch Config

Fastfetch config

Fastfetch generate config:

fastfetch --gen-config

Config on $HOME $HOME/.config/fastfetch/config.jsonc