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
#!/bin/bash
# sudo apt install jq wget curl
# usage: github-install user/repo
set -e
repo=$1
tmp="/tmp/.github-install"
binpath="$HOME/.local/bin"
rm -rf $tmp
@maelvls
maelvls / README.md
Last active October 23, 2025 13:24
Ubuntu, libsecret, git-credential-helper

Dealing with secrets

GNOME comes with libsecret. You can use libsecret to store your git credentials:

sudo apt install libsecret-1-0 libsecret-1-dev libglib2.0-dev
sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
@bitingsock
bitingsock / ytdl-preload.lua
Last active September 26, 2025 14:13
Precache the next entry in your playlist if it is a network source by downloading it to a temp file ahead of time. Change Line 20 to temp directory. It will delete the directory on exit.
----------------------
-- #example ytdl_preload.conf
-- # make sure lines do not have trailing whitespace
-- # ytdl_opt has no sanity check and should be formatted exactly how it would appear in yt-dlp CLI, they are split into a key/value pair on whitespace
-- # at least on Windows, do not escape '\' in temp, just us a single one for each divider
-- #temp=R:\ytdltest
-- #ytdl_opt1=-r 50k
-- #ytdl_opt2=-N 5
-- #ytdl_opt#=etc
@HemanthJabalpuri
HemanthJabalpuri / README.md
Created October 25, 2020 08:52
My settings config for Multiling O Keyboard

INSTALLATION

  1. copy contents of multilingHemanth.txt. (text encoding: UTF-8)
  2. open Multiling Keyboard settings > Misc. > Import | Export > Settings. click on Paste.
@ellisonleao
ellisonleao / twitch-irc-with-weechat.mkd
Last active October 30, 2022 12:10 — forked from noromanba/twitch-irc-with-weechat.mkd
How to join Twitch IRC w/ WeeChat
@henrebotha
henrebotha / dir-switch.zsh
Created October 7, 2020 09:01
Example script for switching working directory in shell & Vim using Tmux
#! /usr/bin/env zsh
# Call this script as ./dir-switch.zsh /desired/directory
set -e
trap 'echo ERROR at $0 $LINENO; return' ERR
active_window=$(tmux list-windows | rg '\(active\)' | sed 's/:.\+//g')
panes=("${(@f)$(tmux list-panes -F '#{pane_index}')}")
active_pane=$(tmux list-panes -F '#{pane_active} #{pane_index}' | rg '^1' | sed 's/^1 //g')
@Ovi3
Ovi3 / aheadfork.py
Created October 6, 2020 04:26
Find all fork repo that are ahead of original repo
#!/usr/bin/python3
# -*-coding:utf-8-*-
"""
Find all fork repo that are ahead of original repo
Before running, install requirement first: python3 -m pip install requests
Reference: https://docs.github.com/en/free-pro-team@latest/rest/reference
"""
import sys
import json
@mattmc3
mattmc3 / split.zsh.md
Last active October 15, 2025 19:50
ZSH - split string into array

There are a ton of different ways to split up a string in Zsh. This gist attempts to show them with examples to help you build your own. I write Zsh scripts all the time, and still reference back to this gist, so there you go.

From the Zsh docs on Parameter Expansion Flags (yeah - I know... how would anyone ever find that if they didn't know where to look!?)

j:string: Join the words of arrays together using string as a separator.
s:string: Force field splitting at the separator string.

You can also read more by running man zshexpn. (Again, I know, right!? How would anyone know to look there!?)

DietPi Give your Single-board computer some Lightweight justice. What you'll need:

4GB or greater Micro SD card.
Internet Access (Ethernet or Wifi, required to complete the DietPi setup).
Dedicated USB Drive is highly recommended (Allows DietPi-Software installations to utilize USB over SD).

Step 1 (Download DietPi Image): Download - dietpi.com

@target111
target111 / termux-url-opener
Last active March 17, 2023 23:11
Simple, clean and easily extendable termux intent handler. Inspired from https://gist.github.com/LordH3lmchen/dc35e8df3dc41d126683f18fe44ebe17
#!/data/data/com.termux/files/usr/bin/bash
#
# You need to create the following directories:
# - storage/shared/Movies/YouTube
# - storage/shared/Music/YouTube
# - storage/shared/Pictures/Instagram
# - projects/
#
# And install the following tools:
# - pip install instaloader yt-download