Skip to content

Instantly share code, notes, and snippets.

View nerd190's full-sized avatar
🤓
coding to music 🎵

Scott nerd190

🤓
coding to music 🎵
  • London
View GitHub Profile
@romkatv
romkatv / migrate-zsh-dotfiles.zsh
Last active September 27, 2025 18:58
Migrate zsh dotfiles from the home directory to another directory on the same machine
# This command moves your zsh dotfiles (.zshrc, .zsh_history, etc.)
# from the home directory to ~/.config/zsh. It's been verified to
# work correctly if you are using zsh4humans. With other zsh configs
# your mileage may vary.
#
# How to:
#
# 1. Close all terminals except one.
# 2. Copy-paste this command into the only remaining terminal.
() {
@amit08255
amit08255 / bspwm.md
Created October 10, 2021 01:52
Bspwm Cheatsheet

bspwm/sxhkd cheat sheet

Common keys

@Strykar
Strykar / upgrade_livepeer.sh
Last active October 16, 2023 11:13
Upgrade Livepeer Go binaries. Run as: $ upgrade_livepeer.sh 4efbda6d5e6586e7eb1e6ccbd526da65cdbe2e4e27a01cb76b1f2893fe790fdb
#!/bin/bash
# Download, extract and update Livepeer binary from Github to a pre-existing directory you set below
# It assumes you have extracted the previous livpeer tar.gz in it and run livepeer from the same directory
# Not intended to be run as root
#
# Expects bash, jq, curl, grep, sed, sha256sum and tar to be installed, usually available even on embedded systems
# Windows Subsystem for Linux (WSL) or Cygwin should provide every utility on Windows
# shellcheck disable=SC2015
set -euf -o pipefail
@iagoleal
iagoleal / lua.lua
Created September 10, 2021 20:11
Properly open lua and fennel required files via gf
local fmt = string.format
-- Iterator that splits a string o a given delimiter
local function split(str, delim)
delim = delim or "%s"
return string.gmatch(str, fmt('[^%s]+', delim))
end
-- Find the proper directory separator depending
-- on lua installation or OS.
@LorbusChris
LorbusChris / MatrixIRC.md
Last active December 30, 2022 19:27
Matrix libera.chat IRC Bridge Setup

Matrix libera.chat IRC Bridge Setup

Change libera.chat IRC Nick

This is optional, in case you prefer your nick to be shown as something other than <matrix_nick>[m] on IRC, e.g. just <matrix_nick> (without the [m] suffix) or <libera_nick>.

Open a private chat with @appservice:libera.chat:

!nick <new_libera_nick>

Note: This does not change your Matrix nick!

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@brbsix
brbsix / send_or_receive.sh
Created January 22, 2021 00:48
send_or_receive.sh
#!/bin/bash
#
# Send or receive data to/from another device on the network.
PROGRAM=${0##*/}
LOCAL_IP=192.168.1.100
PORT=6666
PASSWORD=topsecret
@prologic
prologic / LearnGoIn5mins.md
Last active August 12, 2025 02:24
Learn Go in ~5mins
@vschmidt94
vschmidt94 / retro_gruvbox_linux_wallpaper.svg
Last active August 24, 2025 15:44
A retro / vintage Linux wallpaper with dark gruvbox colors
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@roalcantara
roalcantara / 0_tldr.zsh
Last active June 5, 2025 19:32
Glob (globbing)
## TL;DR
setopt extendedglob
ls *(<tab> # to get help regarding globbing
rm ../debianpackage(.) # remove files only
ls -d *(/) # list directories only
ls /etc/*(@) # list symlinks only
ls -l *.(png|jpg|gif) # list pictures only
ls *(*) # list executables only
ls /etc/**/zsh # which directories contain 'zsh'?