Skip to content

Instantly share code, notes, and snippets.

View msmafra's full-sized avatar
🥶

Marcelo dos Santos Mafra msmafra

🥶
  • Brazil
  • 23:55 (UTC -03:00)
View GitHub Profile
#!/usr/bin/env python3
# ----------------------------------------------------------------------------
# WAYBAR CPU MODULE
# ----------------------------------------------------------------------------
# CPU monitoring script for waybar.
# Features:
# - Per-core usage visualization (Die layout)
# - Power usage (RAPL)
# - Temperature monitoring
# - Top processes consuming CPU

image

CachyOS Kernel for Fedora with Secure Boot

Did you just install kernel-cachyos and got hit by bad shim signature when booting? Me too. This is how I fixed it.

First, make sure you have Secure Boot with mokutil --sb-state.

Note, there's a second way of doing this by using sbctl, but I didn't want to wipe my Secure Boot keys.

Installing the CachyOS Kernel

@mikaeldui
mikaeldui / CachyOS Kernel for Fedora with Secure Boot.md
Last active February 12, 2026 04:31
CachyOS Kernel for Fedora with Secure Boot

image

CachyOS Kernel for Fedora with Secure Boot

Did you just install kernel-cachyos and got hit by bad shim signature when booting? Me too. This is how I fixed it.

First, make sure you have Secure Boot with mokutil --sb-state.

Note, there's a second way of doing this by using sbctl, but I didn't want to wipe my Secure Boot keys.

Need help? Feel free to leave a comment below, contact me (@mikaeldui) on the CachyOS Discord, or send me an email.

@hschne
hschne / tokyo-night.toml
Created April 2, 2025 07:50
Tokyo Night Theme for Atuin
# Drop this into ~/.config/atuin/themes/tokyo-night.toml, then reference it in atuin.conf
#
# See https://docs.atuin.sh/guide/theming/
[theme]
name = "tokyo-night"
parent = "default"
[colors]
AlertInfo = "#73daca"
AlertWarn = "#e0af68"
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active February 12, 2026 05:23
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@scmx
scmx / using-details-summary-github.md
Last active February 3, 2026 18:12
Using <details> <summary> expandable content on GitHub with Markdown #details #summary #markdown #gfm #html

How to use <details> <summary> expandable content on GitHub with Markdown

Firstly, what is <details> <summary>?

The HTML Details Element (<details>) creates a disclosure widget in which information is visible only when the widget is toggled into an "open" state. A summary or label can be provided using the <summary> element. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details.

Example

@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4