Skip to content

Instantly share code, notes, and snippets.

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

Spencer Heywood heywoodlh

:octocat:
Trapped in Helix
View GitHub Profile
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
@heywoodlh
heywoodlh / caffeine.sh
Last active May 31, 2022 03:36
Caffeine shell script (reddit source in comments)
#!/usr/bin/env bash
if uname | grep -i linux
then
status=`xset -q | grep 'DPMS is' | awk '{ print $3 }'`
if [ $status == 'Enabled' ]
then
xset -dpms && \
notify-send 'Screen suspend is disabled.'
else
xset +dpms && \
#!/usr/bin/env bash
rofi -combi-modi window,drun,ssh -theme nord -font "arial 10" -show combi -show-icons
@heywoodlh
heywoodlh / .pre-commit-hooks.yaml
Last active May 24, 2022 20:38
Pre-commit hooks
- id: gitleaks-docker
name: Detect hardcoded secrets
description: Detect hardcoded secrets using Gitleaks
entry: heywoodlh/gitleaks protect --verbose --redact --no-git
language: docker_image
flan-scan () {
if [[ -z "$@" ]] || [[ $1 == '--help' ]]
then
printf 'flan-scan "192.168.0.0/24 192.168.1.0/24"\n'
else
mkdir -p ~/tmp/flan_scan/reports
mkdir -p ~/tmp/flan_scan/xml_files
if [ -e ~/tmp/flan_scan/flan-ips.txt ]
imports:
base16-shell: dotfiles/config/base16-shell
choose-file-manager: home/bin/
choose-launcher: home/bin/
choose-buku: home/bin/
vultr-sh: home/bin
journal: home/bin
log: home/bin
imports:
base16-shell: dotfiles/config/base16-shell
choose-file-manager: home/bin/
choose-launcher: home/bin/
choose-buku: home/bin/
vim-airline: dotfiles/vim/bundle/airline
vim-airline-themes: dotfiles/vim/bundle/airline-themes
vim-auto-pairs: dotfiles/vim/bundle/auto-pairs