This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -- zathurarc ------------------------------ | |
| # reference: https://manpages.ubuntu.com/manpages/stonking/man5/zathurarc.5.html | |
| # Press Ctrl-R to toggle recoloring (dark/default views) | |
| # -- Window --------------------------------- | |
| set window-height 1024 | |
| set window-width 768 | |
| set adjust-open "best-fit" | |
| # set show-scrollbars true | |
| set window-title-basename true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Dotfiles Bootstrap - Quick Start | |
| # --------- | |
| # 1. Register SSH key registered on GitHub. | |
| # generate key (if needed) | |
| ssh-keygen -t ed25519 -C "your@email.com" -f ~/.ssh/id_ed25519 -N "" | |
| # paste ~/.ssh/id_ed25519.pub at https://github.com/settings/ssh/new | |
| # alternative to copying: generate a QR code, scan with phone, save to notes or use phone to add key. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://tombi-toml.github.io/tombi/docs/configuration | |
| toml-version = "v1.0.0" | |
| [files] | |
| include = ["**/*.toml"] | |
| exclude = [".cache/**/*.toml"] | |
| [format] | |
| [format.rules] | |
| array-bracket-space-width = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Based on: | |
| # https://github.com/rvben/rumdl/blob/main/rumdl.toml.example | |
| # Global configuration options | |
| [global] | |
| exclude = [ | |
| # e.g. exclude any obsidian- or mkdocs- style files | |
| ] | |
| include = ["**/*.md", "**/*.mdc", "**/*.gfm"] | |
| # Globally disable specific rules based on .markdownlint.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| """ | |
| Example of using fcntl.flock for locking file. Some code inspired by filelock module. | |
| """ | |
| import fcntl | |
| import os | |
| import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To run this demo: | |
| # uv run https://gist.github.com/lucaspar/9560f11cfefdb19375c22b57f2103c76 | |
| # /// script | |
| # requires-python = ">=3.13" | |
| # dependencies = ["rich"] | |
| # /// | |
| import multiprocessing | |
| import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # This script installs NVIDIA drivers and container toolkit on RHEL 9. | |
| # It should be safe to run it multiple times: steps are skipped when not needed. | |
| # This is an interactive script: system and services restarts are prompted to the user. | |
| # Source: | |
| # https://gist.github.com/lucaspar/def9198eabc110345c746806e0b90f38/ | |
| set -euo pipefail |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Usage: dckr-volumes [OPTIONS] | |
| # Lists dangling Docker volumes and their sizes. | |
| # Options: | |
| # -h, --help Shows this help message and exit | |
| # -a, --all Lists all Docker volumes and their sizes, not only dangling ones | |
| # --no-header Hides the header | |
| # | |
| set -euo pipefail |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Returns success (0) if the argument exists as a program, alias, or a function. | |
| function exists() { | |
| # if no argument, show usage and return false | |
| if [ -z "${1}" ]; then | |
| echo "Usage: exists <program>" | |
| return 1 | |
| fi | |
| command -v "${1}" >/dev/null 2>&1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://gist.github.com/lucaspar/c6ed7e5654887beeb703b163d9b57712 | |
| # Add this function to your .bashrc, then source it: `source ~/.bashrc` or restart the terminal. | |
| # Helper function for submitting working changes into version control and avoid loss of work. | |
| # Work in Progress (`wip`) will create a temporary commit with your unstaged changes and a | |
| # generic message. When run subsequently and within 24h of the last "wip" commit, it amends | |
| # the last commit to prevent cluttering the commit history. Otherwise it will create a new "wip" | |
| # commit. After a few hours of work, consider amending the "wip" commit with a proper message. | |
| # Usage: | |
| # wip [options] [file_a path_b file_c ...] |
NewerOlder