Skip to content

Instantly share code, notes, and snippets.

View sheeeng's full-sized avatar
🤿
It's Sunday! ٩(◕‿◕)۶

Leonard Sheng Sheng Lee sheeeng

🤿
It's Sunday! ٩(◕‿◕)۶
View GitHub Profile
@sheeeng
sheeeng / mpd.md
Created October 30, 2024 19:05 — forked from lirenlin/mpd.md
simple mpd and ncmpcpp setup
@sheeeng
sheeeng / .screenrc-main-example
Created October 23, 2024 08:21 — forked from ChrisWills/.screenrc-main-example
A nice default screenrc
# GNU Screen - main configuration file
# All other .screenrc files will source this file to inherit settings.
# Author: Christian Wills - [email protected]
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Gotten from the RedHat GPG migration manual

Backup the public and secret keyrings and trust database

## Export all public keys

gpg -a --export >mypubkeys.asc

@sheeeng
sheeeng / nerd_fonts.md
Created May 24, 2024 08:16 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]
@sheeeng
sheeeng / README.md
Last active April 29, 2024 09:19 — forked from duboisf/README.md
Example GitHub graphql queries using the gh cli

List all the default branches of repositories in a specific organisation

gh api graphql --paginate \
    --jq '.data.organization.repositories.nodes[] | .defaultBranchRef.name + "\t" + .name' \
    -F org=SomeOrg \
    -f query='
query($org:String!, $endCursor:String) { 
  organization(login:$org) {
    repositories(first: 100, after: $endCursor, isFork:false, orderBy: {field:NAME, direction:ASC}) {

The following icon sets are bundled with Material for MkDocs:

  • :material-material-design: – [Material Design] ( :material-account-credit-card: :material-bank: :material-cash-register: :material-safe: :material-github: :material-kubernetes: :material-microsoft-azure: )

  • :fontawesome-brands-font-awesome: – [FontAwesome] ( :fontawesome-brands-slack: :fontawesome-brands-microsoft: :fontawesome-brands-windows: :fontawesome-brands-markdown: :fontawesome-brands-python: :fontawesome-brands-golang: :fontawesome-brands-rust: )

  • :octicons-mark-github-16: – [Octicons] ( :octicons-git-branch-24: :octicons-git-commit-24: :octicons-git-compare-24: :octicons-git-merge-24: :octicons-git-merge-queue-24: :octicons-git-pull-request-24: :octicons-git-pull-request-closed-24: :octicons-git-pull-request-draft-24: )

  • :simple-simpleicons: – [Simple Icons] ( :simple-kubernetes: :simple-github: :simple-githubpages: :simple-githubactions: )

    [Materia

@sheeeng
sheeeng / gist:94b1bf746d96b58a84ec9f8d6bfefcd6
Created December 18, 2023 12:28 — forked from andreibosco/gist:cb8506780d0942a712fc
Using GNU Stow to manage your dotfiles

Fonte: http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html?round=two

I accidentally stumbled upon something yesterday that I felt like sharing, which fell squarely into the "why the hell didn't I know about this before?" category. In this post, I'll describe how to manage the various configuration files in your GNU/Linux home directory (aka "dotfiles" like .bashrc) using GNU Stow.

The difficulty is that it would be helpful to manage one's configuration files with a version control system like Git, Mercurial or Bazaar, but many/most dotfiles reside at the top-level of your home directory, where it wouldn't be a good idea to initialize a VCS repository. Over time I've come across various programs which aim to manage this for you by keeping all the files in a subdirectory and then installing or linking them into their appropriate places. None of those programs ever really appealed to me. They would require a ton of dependencies (like Ruby and a ton of libraries for it) or t

@sheeeng
sheeeng / README.md
Last active January 27, 2024 19:33 — forked from GusAntoniassi/README.md
Configure autocompletion to kubectl with zsh

kubectl with ZSH (oh-my-zsh)

How to configure

Use the following commands to add the kubectl autocomplete to zsh:

mkdir -p ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/
kubectl completion zsh > ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/kubectl-autocomplete.plugin.zsh
@sheeeng
sheeeng / spabs.md
Created December 15, 2023 09:51 — forked from eevee/spabs.md
tabs to spaces