Skip to content

Instantly share code, notes, and snippets.

View wdhg's full-sized avatar
🐢
lucas = 2 : 1 : zipWith (+) lucas (tail lucas)

William Grant wdhg

🐢
lucas = 2 : 1 : zipWith (+) lucas (tail lucas)
View GitHub Profile
@wdhg
wdhg / sss.zsh
Created December 19, 2021 09:13
function sss() {
if pgrep ssh-agent &> /dev/null; then
echo "ssh-agent already running. Do you want to restart it? [Y/n]"
read -rs -k 1 Res
case "${Res}" in
n|N)
return 0
;;
@wdhg
wdhg / plex.sh
Last active May 10, 2021 17:31
Setup Plex on a stock Ubuntu server
#!/bin/bash
# UNCOMMENT AND ENTER CLAIM KEY HERE https://www.plex.tv/claim/
# PLEX_CLAIM=""
PLEX_PATH=/home/plex
set -e
# check claim key has been entered
#!/bin/zsh
if [[ ! $1 =~ "^[0-9a-fA-F]{6}$" ]]; then
echo "Usage: $(basename $0) <hexcode> [text]"
echo "Examples: $(basename $0) 00ff00"
echo " $(basename $0) ff00ff this is magenta"
exit
fi
r=$(echo $1 | cut -c 1-2)