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
View k0sctl.yaml
apiVersion: k0sctl.k0sproject.io/v1beta1
kind: Cluster
spec:
hosts:
- role: controller+worker
ssh:
address: 100.89.165.64
user: nathanhywd
noTaints: true
privateInterface: tailscale0
@heywoodlh
heywoodlh / maderas.txt
Created June 19, 2019 15:47
Clone of the arsenal, armory & library by Maderas (@hackermaderas) -- https://pastebin.com/v8Mr2k95
View maderas.txt
The arsenal, armory & library by Maderas (@hackermaderas, #CyberpunkisNow) 6/8/2019
Original / 1st version here: https://pastebin.com/rMw4WbhX
___________________________________________________________________________________
# Basic knowledge requirements for Red Teaming, PenTesting, Hacking & Cybersecurity
# These are the basic competencies expected (and tested for during the in-person technical interview) by one of the largest, most visible InfoSec companies # on Earth.
@heywoodlh
heywoodlh / reset-terminal-services.ps1
Created September 1, 2017 14:49
Script for renewing RDP License
View reset-terminal-services.ps1
## This Script is intended to be used for Querying remaining time and resetting Terminal Server (RDS) Grace Licensing Period to Default 120 Days.
## Developed by Prakash Kumar (prakash82x@gmail.com) May 28th 2016
## www.adminthing.blogspot.com
## Disclaimer: Please test this script in your test environment before executing on any production server.
## Author will not be responsible for any misuse/damage caused by using it.
Clear-Host
$ErrorActionPreference = "SilentlyContinue"
## Display current Status of remaining days from Grace period.
@heywoodlh
heywoodlh / README.md
Created February 27, 2018 22:55
ADB Scripts
View README.md

adb-scripts

This repository consists of useful adb scripts/commands for the Samsung Galaxy S8.

Feel free to fork this repository and submit your own scripts.

@heywoodlh
heywoodlh / ish-setup.sh
Last active May 25, 2023 03:48
My shell script for setting up iSH
View ish-setup.sh
#!/usr/bin/env ash
## Enable location, allow iSH to run in background
grep -q '/dev/location' $HOME/.profile || echo 'cat /dev/location > /dev/null &' >> $HOME/.profile && source $HOME/.profile
# Install my dependencies
apk update
apk add vim git coreutils openssh-client mosh tmux curl
# Setup tmux
@heywoodlh
heywoodlh / example-1.nix
Created April 14, 2023 20:08
Example of Nix's option expansion
View example-1.nix
{
programs.zsh.enable = true;
programs.zsh.enableAutosuggestions = true;
programs.zsh.envExtra = ''
export MYVAR="true"
export MYVAR2="false"
'';
}
View macos-battpop.sh
#!/usr/bin/env bash
title="Battery"
battery_level="$(pmset -g batt | grep 'InternalBattery' | awk '{print $3 $4}' | awk '{print $1}' | cut -d';' -f1)"
osascript -e "display notification \"${battery_level}\" with title \"${title}\""
View macos-notify-send.sh
#!/usr/bin/env bash
# Usage: macos-notify-send.sh "Title" "Message"
osascript -e "display notification \"$2\" with title \"$1\""
@heywoodlh
heywoodlh / anti-ddos.yml
Created October 25, 2017 21:07
Ansible playbook to install Anti-DDOS script: https://github.com/ismailtasdelen/Anti-DDOS.git
View anti-ddos.yml
---
- hosts: my-webservers
tasks:
- name: download the git repository
command: git clone https://github.com/ismailtasdelen/Anti-DDOS.git /tmp/Anti-DDOS
- name: run the shell script
command: bash /tmp/Anti-DDOS/anti-ddos.sh
become: true
@heywoodlh
heywoodlh / README.md
Last active March 19, 2023 21:00
Auth logging on MacOS using the log command
View README.md
mkdir -p /opt/scripts
mkdir -p /var/log/custom
mkdir -p /var/root/Library/LaunchAgents


curl 'https://gist.githubusercontent.com/heywoodlh/0295135b9e24ec0729571497c9ab5a77/raw/b3032d9a563c956f574176c39cb2a5382f8c579c/auth-log.sh' -o /opt/scripts/auth-log.sh
chmod +x /opt/scripts/auth-log.sh