Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Spencer Heywood heywoodlh

:octocat:
View GitHub Profile
View sc-vulnerable.sh
#!/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 Jul 19, 2022
Docker Compose for OpenVAS
View openvas-docker-compose.yml
version: '3.7'
services:
redis-server:
image: greenbone/redis-server
restart: on-failure
cap_drop:
- ALL
volumes:
- redis_socket_vol:/run/redis/
View st-install.sh
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 Jul 3, 2022
Youtube channel monitoring script
View livestream-monitor.sh
#!/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'
View watch-lima.sh
#!/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
Caffeine shell script (reddit source in comments)
View caffeine.sh
#!/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 && \
View launcher.sh
#!/usr/bin/env bash
rofi -combi-modi window,drun,ssh -theme nord -font "arial 10" -show combi -show-icons
View .pre-commit-hooks.yaml
- id: gitleaks-docker
name: Detect hardcoded secrets
description: Detect hardcoded secrets using Gitleaks
entry: heywoodlh/gitleaks protect --verbose --redact --no-git
language: docker_image
View flan-scan.sh
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 ]