Skip to content

Instantly share code, notes, and snippets.

@corrigat
corrigat / 2023 08 23
Created August 23, 2023 18:48
PGP '23 tyler.corrigan@tanium.com
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFxbWQgBEADkr8634P6771Thp+k7LTER06aK3QHf9cKFnhDuQSYSLU6i1G0t
PXh/eHjp6lxrKSucKk/RWY3HbhxChFz3z+jO9OUDL4VSrNXS5/8+RAYuGcxMQQMU
BdMyNQ3oX6Q6Juh34JKGUBfygLmuFZODMF/fkxSVOG1Z9FjXZ7SnwTgA+mD3qOSQ
Ppu7aTdC851+2lMrtvBg8Ff9rIPISJSbZBVOMrgrIJe6CEHiHbB7JOpfJC1DSETG
mdApNNYZjDxmCdjYGcDCTvFUaIOdjKlJ2vwEsVKD1pk3KiF+rsbmad/fUctdSDde
H+PbsUT9W8fsrtshXVo1idrjMKuRyN9usxktsmiwMTfuPNik+cLnXjyVD+uCvrYU
4C5GmeAFF6FA69MFlw5tpnK9JhpY/6Umm+LCUf+5IZENYasPyNxe5AT7z2cMXz1L
Fm1jY3PhEkd8SNwV3OaullR1PvkvGCDgQOEtmTXmdvYvRV669QNTOQbB9axOvyak
@corrigat
corrigat / seltzerator.md
Created April 26, 2023 19:33
The Seltzerator

This kegerator will fit 4 kegs when the tank is external, so there's plenty of room to have the tank inside and stuff some other drinks in it if you want to keep something else cool close by too :)

The kegerator can be substituted for any other, just be sure that

  • It comes with or you purchase a primary regulator, which hooks up to the CO2 tank
  • It comes with a tower with however many taps you want
  • (optional) It comes with or you purchase forward-sealing faucets with flow control
    • Forward-sealing prevents drips
    • Flow control lets you slow the pour so you don't lose carbonation

Kegerator

@corrigat
corrigat / gist:33b514e5cdf43973c2d6273c7c09e65f
Last active January 2, 2023 16:54
Host an Icarus server on a windows system
First you'll need a modern version of powershell - v5.1 or later, which ships with current versions of windows 10 and higher.
Head to the Powershell GSM repository and download the code with the green Code button: https://github.com/patrix87/PowerShellGSM
Extract the archive somewhere. The server files will live here as well. I picked c:\pgsm.
In the extracted folder, copy the template config to the config dir:
cp templates/icarus.psm1 config/icarus.psm1
In the launchers directory, copy run.cmd to icarus.cmd:
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFxbWQgBEADkr8634P6771Thp+k7LTER06aK3QHf9cKFnhDuQSYSLU6i1G0t
PXh/eHjp6lxrKSucKk/RWY3HbhxChFz3z+jO9OUDL4VSrNXS5/8+RAYuGcxMQQMU
BdMyNQ3oX6Q6Juh34JKGUBfygLmuFZODMF/fkxSVOG1Z9FjXZ7SnwTgA+mD3qOSQ
Ppu7aTdC851+2lMrtvBg8Ff9rIPISJSbZBVOMrgrIJe6CEHiHbB7JOpfJC1DSETG
mdApNNYZjDxmCdjYGcDCTvFUaIOdjKlJ2vwEsVKD1pk3KiF+rsbmad/fUctdSDde
H+PbsUT9W8fsrtshXVo1idrjMKuRyN9usxktsmiwMTfuPNik+cLnXjyVD+uCvrYU
4C5GmeAFF6FA69MFlw5tpnK9JhpY/6Umm+LCUf+5IZENYasPyNxe5AT7z2cMXz1L
Fm1jY3PhEkd8SNwV3OaullR1PvkvGCDgQOEtmTXmdvYvRV669QNTOQbB9axOvyak
@corrigat
corrigat / centos5-rhel5-openjdk.md
Last active May 17, 2023 22:48
Building OpenJDK OpenJDK9 OpenJDK10 OpenJDK11 on Centos5 x86 and/or x86_64

Building OpenJDK9 OpenJDK10 OpenJDK11 on centos5

Why?

So you have to build software on this platform still, for SOME reason. Probably money, right? Yeah, I like money. Anyway... Either you, or someone you know has updated your Jenkins installation and now everything requires Java 11. MAYBE you got to plan this out and identified you'll have to get the agent to run on centos5. I didn't have that luxury. It was a weekend slack notification asking if Jenkins was dead. It's been a long week...

How?

Get your Centos 5.11 VM deployed. Clone it. Don't mess with the original machine. Get your yum.repos.d configs pointed to an http, not https, centos-vault mirror.

Install your dependencies from yum:

@corrigat
corrigat / pso2-casefold.bash
Last active October 2, 2022 00:56
PSO2 NGS casefolding setup for steam deck
#!/bin/bash
# Change to the game directory
gamedir="/run/media/mmcblk0p1/steamapps/common/PHANTASYSTARONLINE2_NA_STEAM"
if [ ! -d "${gamedir}" ]; then
echo "Could not find game directory at ${gamedir}."
echo "It is much easier to follow the instructions at https://bit.ly/3y7HI6V"
echo "to set up the game directory before installing."
echo "If you still want to use this script, be sure to download it to your SD card first."
@corrigat
corrigat / install-cmake.sh
Last active February 18, 2021 01:23
linux tricks for packer
#!/bin/bash
set -e
set -x
CMAKE_VERSION=3.14.5
echo "Installing cmake $CMAKE_VERSION"
#Use newer curl on centos5
PATH=/usr/local/bin:$PATH
my_cpus=$(cat /proc/cpuinfo | grep processor | wc -l)
@corrigat
corrigat / packer.pkr.hcl
Created December 8, 2020 03:53
Packer HCL template for VM with nested virtualization enabled
source "vsphere-iso" "centos7-base" {
# vCenter settings
vcenter_server = var.vcenter_server
username = var.vcenter_username
password = var.vcenter_password
insecure_connection = true
cluster = var.vcenter_cluster
datacenter = var.vcenter_datacenter
#host = var.vcenter_host
datastore = var.vcenter_datastore
@corrigat
corrigat / .bashrc
Created November 10, 2020 05:24
bash function for switching staged packer versions
switch_packer () {
TO_VER=$(echo $1 | sed "s/\./\_/g")
HOME_BIN="$HOME/.bin"
PACKER_BIN="$HOME/.bin/packer"
PACKER_BIN_1_3_5="$HOME/.bin/packer-1.3.5/packer"
PACKER_BIN_1_6_5="$HOME/.bin/packer-1.6.5/packer"
if [ $# -eq 0 ] ; then
echo "No packer version given, giving up."
return 1
fi
2020-11-03T21:05:43.237Z info hostd[1051087] [Originator@6876 sub=Vimsvc.TaskManager opID=ac1daf6-01-97-29d1 user=vpxuser:TESTALLTHETHINGS.NET\Administrator] Task Created : haTask-175-vim.VirtualMachine.reconfigure-2608349237
2020-11-03T21:05:43.237Z info hostd[1051091] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/5e57ff18-4b936e87-57a2-0cc47ac42218/packer-centos7-vcenter-base/packer-centos7-vcenter-base.vmx opID=ac1daf6-01-97-29d1 user=vpxuser:TESTALLTHETHINGS.NET\Administrator] State Transition (VM_STATE_OFF -> VM_STATE_RECONFIGURING)
2020-11-03T21:05:43.237Z verbose hostd[1051091] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/5e57ff18-4b936e87-57a2-0cc47ac42218/packer-centos7-vcenter-base/packer-centos7-vcenter-base.vmx opID=ac1daf6-01-97-29d1 user=vpxuser:TESTALLTHETHINGS.NET\Administrator] Invoking interceptor:1-hbr
2020-11-03T21:05:43.237Z verbose hostd[1051091] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/5e57ff18-4b936e87-57a2-0cc47ac42218/packer-centos7-vcenter-base/packer-centos7-vcenter-base.vmx opID=a