Skip to content

Instantly share code, notes, and snippets.

View bvierra's full-sized avatar

Billy Vierra bvierra

View GitHub Profile
@bvierra
bvierra / Makefile
Created February 22, 2025 20:11
example packer
.PHONY: ubuntu2404
ubuntu2404:
packer init .
packer build -var-file config/accounts.pkr.hcl -var-file config/proxmox.pkr.hcl -var-file config/vm.pkr.hcl -var-file config/ubuntu-2404.pkr.hcl -force ubuntu-2404/
@bvierra
bvierra / etc-bash.bashrc
Created December 18, 2024 00:20
bashrc defaults ubuntu
[ -z "$PS1" ] && return
shopt -s checkwinsize
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
if ! [ -n "${SUDO_USER}" -a -n "${SUDO_PS1}" ]; then
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
case " $(groups) " in *\ admin\ *|*\ sudo\ *)
#!/bin/bash
# Exit on error
set -e
# Variables
DISK="/dev/sda"
CHROOT_DIR="/mnt/gentoo"
# Partition the disk
#!/bin/bash
# Made by u/BinkReddit
# Taken From: https://www.reddit.com/r/linuxadmin/comments/1hcrge3/kernel_patch_changelog_summary/
# set -x
if ! command -v curl >/dev/null 2>&1; then
echo "This script requires curl."
exit 1
fi
@bvierra
bvierra / main.tf
Last active March 15, 2024 15:24
proxmox qemu vm module w/cloud-init
# use Telmate/proxmox 3.0.1-rc1 provider
terraform {
required_providers {
proxmox = {
source = "Telmate/proxmox"
version = "3.0.1-rc1"
}
}
}
#!/usr/bin/env bash
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
wget https://cloud-images.ubuntu.com/jammy/current/SHA256SUMS
cat SHA256SUMS | grep jammy-server-cloudimg-amd64.img > sha256sum
sha256sum --check sha256sum
qm create 8000 --name ubuntu-22.04-server-template --memory 1024 --net0 virtio,bridge=vmbr0 --cores 1 --sockets 1 --cpu cputype=host --description "Ubuntu 22.04 (jammy) server with cloud-init image" --kvm 1 --numa 1
qm importdisk 8000 jammy-server-cloudimg-amd64.img proxmox-nfs
qm disk rescan
qm set 8000 --scsihw virtio-scsi-pci --virtio0 proxmox-nfs:8000/vm-8000-disk-0.raw
@bvierra
bvierra / ansible-hosts.tftpl
Last active July 10, 2023 11:26
user-data.tftpl
[dns]
%{ for node_host, node_hostname in node_map_pdns ~}
${node_hostname} ansible_host=${node_host}
%{endfor}
[netbox]
%{ for node_host, node_hostname in node_map_netbox ~}
${node_hostname} ansible_host=${node_host}
%{endfor}
{
"filebeat-7.12.0-2021.04.05-000006" : {
"shards" : [
{
"id" : 0,
"type" : "PEER",
"stage" : "DONE",
"primary" : false,
"start_time_in_millis" : 1617680870902,
"stop_time_in_millis" : 1617683693012,
#!/usr/bin/env bash
### Customization:
blue="\033[0;34m"
brightblue="\033[1;34m"
cyan="\033[0;36m"
brightcyan="\033[1;36m"
green="\033[0;32m"
brightgreen="\033[1;32m"
red="\033[0;31m"
/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_AdheredIronPlate.Recipe_Alternate_AdheredIronPlate_C
/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_BoltedFrame.Recipe_Alternate_BoltedFrame_C
/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_CoatedCable.Recipe_Alternate_CoatedCable_C
/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_CoatedIronPlate.Recipe_Alternate_CoatedIronPlate_C
/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_CokeSteelIngot.Recipe_Alternate_CokeSteelIngot_C
/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_CopperAlloyIngot.Recipe_Alternate_CopperAlloyIngot_C
/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_CopperRotor.Recipe_Alternate_CopperRotor_C
/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_DilutedPackagedFuel.Recipe_Alternate_DilutedPackagedFuel_C
/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3