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
@heywoodlh
heywoodlh / README.md
Created February 27, 2018 22:55
ADB Scripts

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
#!/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
{
programs.zsh.enable = true;
programs.zsh.enableAutosuggestions = true;
programs.zsh.envExtra = ''
export MYVAR="true"
export MYVAR2="false"
'';
}
#!/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}\""
#!/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
---
- 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
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

@heywoodlh
heywoodlh / plex.nix
Created March 14, 2023 22:34
Simple Plex configuration for MacOS
{ config, pkgs, ... }:
{
#package config
nix.package = pkgs.nix;
nixpkgs.config.allowUnfree = true;
#homebrew packages
homebrew = {
enable = true;
@heywoodlh
heywoodlh / config.yaml
Last active February 13, 2023 05:35
BEEF temp config
#
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
# BeEF Configuration file
beef:
version: '0.5.4.0'
# More verbose messages (server-side)
#!/usr/bin/env bash
bw get password ssh/key_passphrase | head -1