Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bunchc
bunchc / Dockerfile
Last active May 12, 2023 18:29
Using custom golang plugins with the Kong Ubuntu image
# To build and load custom GO plugins into the Kong Ubuntu image
# we use a multistage docker build. The first stage uses the golang
# image to build the plugin. The second stage then copies that plugin
# into the Kong Ubuntu image.
# Build the golang plugin
FROM golang:alpine as build
WORKDIR /plugin
COPY go-plugins/* ./
@bunchc
bunchc / user_data_hardening.sh
Last active April 28, 2023 14:21
Script for hardening a box via user-data
#!/bin/bash
# user-data-hardening.sh
# Authors: Cody Bunch (bunchc@gmail.com)
#
# Script intended to be supplied as userdata to a cloud of some flavor.
# Enables some sane sysctl defaults, turns up iptables, and
# installs a HIDS / NIDS package
# Supply your email here
email_address="userdata@mailinator.com"
@bunchc
bunchc / custom.ipxe
Created May 5, 2021 13:32
Custom ipxe menu for netboot.xyz
#!ipxe
###
### codybunch.lab custom menu example
###
:custom
clear custom_choice
menu ESXi
item --gap Boot ESXi Installer
item esxi_70_kickstart ${space} 7.0 Automated Install
@bunchc
bunchc / kickstart.ks
Created May 5, 2021 12:59
ESXi Kickstart file
#Accept the VMware End User License Agreement
vmaccepteula
# clear paritions and install
clearpart --firstdisk --overwritevmfs
install --firstdisk --ignoressd --overwritevmfs --novmfsondisk
#set the root password
rootpw VMware1!
@bunchc
bunchc / script_custom.ps1
Last active December 10, 2021 18:47
Windows 10 customization script
# Install chocolatey & boxstarter
Set-ExecutionPolicy AllSigned; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
. { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
# Basic setup
Write-Host "Setting execution policy"
Update-ExecutionPolicy Unrestricted
###########################################
# Update Windows and reboot if necessary #
0.0.0.0 0.0.0.0
0.0.0.0 2game.com
0.0.0.0 3games1box.com
0.0.0.0 5games1box.com
0.0.0.0 account-public-service-prod03.ol.epicgames.com
0.0.0.0 account.ubisoft.com
0.0.0.0 accountportal-website-prod07.ol.epicgames.com
0.0.0.0 accounts.ea.com
0.0.0.0 accounts.epicgames.com
0.0.0.0 accounts.launcher-website-prod07.ol.epicgames.com
@bunchc
bunchc / ssh.conf
Created September 24, 2020 13:17
Start tmux on ssh connect
Host dethkopter
Hostname dethkopter.mordhaus
User toki.wartooth
Port 22
RequestTTY yes
RemoteCommand "tmux new-session -s metalocalypse || tmux attach-session -t metalocalypse"
@bunchc
bunchc / tasks.json
Created September 3, 2020 16:04
Join a zoom call from within VSCode
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Join meeting",
"type": "shell",
"windows": {
"command": "C:\\Program Files (x86)\\Zoom\\bin\\Zoom.exe",
@bunchc
bunchc / userdata-hardening-ufw
Created August 20, 2017 15:40
UserData Hardening script with UFW
#!/bin/bash
# user-data-hardening.sh
# Authors: Cody Bunch (bunchc@gmail.com)
#
# Script intended to be supplied as userdata to a cloud of some flavor.
# Enables some sane sysctl defaults, turns up iptables, and
# installs a HIDS / NIDS package
# Supply your email here
email_address="userdata@mailinator.com"
@bunchc
bunchc / nord-microsoft_terminal.json
Created March 30, 2020 13:38
Nord theme for different terminals
"schemes": [
{
"name" : "nord",
"background" : "#2e3440",
"foreground" : "#d8dee9",
"black": "#2e3440",
"blue": "#81a1c1",
"brightBlack": "#4c566a",
"brightBlue": "#81a1c1",
"brightCyan": "#8fbcbb",