Skip to content

Instantly share code, notes, and snippets.

View heywoodlh's full-sized avatar
:octocat:
Trapped in Vim

Spencer Heywood heywoodlh

:octocat:
Trapped in Vim
View GitHub Profile
#!/usr/bin/env bash
media_dir="/Volumes/DataStore2"
root_dir="/Volumes/DataStore2/plex_containers"
docker network ls | grep -q plex && docker network create plex
mkdir -p ${root_dir}
#docker run -d --restart unless-stopped --name plex \
# -v ${root_dir}/plex:/config \
#!/usr/bin/env bash
# Variable for path to mobile-nix boot.img
mobile_nix_boot_img_path='./mobile-nix-boot.img'
# Variable for path to lineage boot.img (recovery)
lineage_boot_img_path='./lineage-boot.img'
# Variables for directory names to place extracted contents
lineage_out_dir='lineage-extracted'
mobile_nix_out_dir='mobile-nix-extracted'
@heywoodlh
heywoodlh / pbcopy
Created October 3, 2022 16:54
Cross-platform (MacOS, Linux, FreeBSD) pbcopy
#!/usr/bin/env bash
if uname -a | grep -iq Darwin &>/dev/null
then
/usr/bin/pbcopy
else
xclip -r -selection clipboard
fi
[
{
"name": "Giant Ants of the Commonwealth",
"game": "fallout4",
"modId": 34860,
"fileId": 160279,
"source": "nexus"
},
{
"name": "Glock 19X - Pistol",
#!/usr/bin/env bash
# If Arch Linux
if grep -q 'Arch Linux' /etc/os-release
then
pacman -Syu --noconfirm --overwrite '*' ansible git vim curl \
&& echo 'Installed base packages' | tee -a /opt/setup.log
ln -s /usr/bin/vim /usr/bin/vi
fi
@heywoodlh
heywoodlh / openvas-docker-compose.yml
Created July 19, 2022 22:20
Docker Compose for OpenVAS
version: '3.7'
services:
redis-server:
image: greenbone/redis-server
restart: on-failure
cap_drop:
- ALL
volumes:
- redis_socket_vol:/run/redis/
cd /tmp
# Download the st source:
curl -LO 'https://dl.suckless.org/st/st-0.8.4.tar.gz'
tar xzf st-0.8.4.tar.gz
cd st-0.8.4
# Nord theme:
curl -LO 'https://st.suckless.org/patches/nordtheme/st-nordtheme-0.8.2.diff'
patch -Np1 -i st-nordtheme-0.8.2.diff
@heywoodlh
heywoodlh / livestream-monitor.sh
Last active July 3, 2022 17:26
Youtube channel monitoring script
#!/usr/bin/env bash
# Script assumes the following:
# - streamlink is installed: `pip3 install streamlink`
# - gotify will be used to send push notifications (modify it yourself if you need another CLI push utility)
# Edit these variables
channel_id=''
channel_title='My Youtube Channel'
#!/usr/bin/env bash
if limactl list | grep -q docker
then
echo 'lima docker vm exists'
else
echo 'lima docker vm does not exist -- creating now'
limactl start --name=docker template://docker --tty=false
fi