Skip to content

Instantly share code, notes, and snippets.

View bunchc's full-sized avatar

Cody Bunch bunchc

View GitHub Profile
@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 / 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!
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 / 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",
---
- name: Create a partition with drive letter D and size 1020 GiB
hosts: "{{host}}"
tasks:
- name: do the thing
win_partition:
drive_letter: D
partition_size: 1020 GiB
disk_number: 2
@bunchc
bunchc / hub_ctrl.py
Created February 11, 2019 21:49
There Are Door Lights - hub_ctrl mods
def send_command(listing, busnum, devnum, hub, port, value, verbose):
""" send_command(self, parameter_list)
Sends the power control command to the USB hub.
"""
if hub == None and busnum == None:
hub = 0 # Default hub = 0
cmd = COMMAND_SET_POWER
@bunchc
bunchc / door_sensor.py
Last active February 11, 2019 21:31
There Are Door Lights - Light Sensor
from gpiozero import LightSensor
import hub_ctrl
sensor = LightSensor(4)
print(sensor.light_detected)
while True:
# sensor.when_light = hub_ctrl.send_command(listing=True, busnum=1, devnum=2, hub=None, port=2, value=1, verbose=False)
sensor.wait_for_light()
hub_ctrl.send_command(listing=True, busnum=1, devnum=2, hub=None, port=2, value=1, verbose=False)