Skip to content

Instantly share code, notes, and snippets.

@jhg03a
jhg03a / CustomVMwareSecurebootIso.md
Created October 20, 2022 21:44
Some instructions on how to make an UEFI SecureBoot capable custom ISO with menus for Kickstart

I couldn't find instructions on the internet anywhere for how to craft a UEFI secure bootable VMware ESXi installer disk iso. I worked it out using the rEFInd OSS project. This is not perfect or optimal, but it does the job.

Inspirational Links of note

@jhg03a
jhg03a / async.perf.results.json
Created February 19, 2021 18:18
Ansible async benchmark results
{
"asyncTimeout": "900",
"asyncTimeoutOverheadMarginPercent": 20,
"iterations": 10,
"pollInterval": 5,
"sleepTime": 15,
"testResults": {
"async": {
"agg": {
"id": {
@jhg03a
jhg03a / gist:dc2abbd453b1139e5b29f4f2bffff1d7
Created February 19, 2021 18:17
Ansible Async Benchmark Execution
bash-5.0# ansible-playbook -i localhost test.yml -vvvv
ansible-playbook 2.10.3
config file = /app/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.8/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 3.8.5 (default, Jul 20 2020, 23:11:29) [GCC 9.3.0]
Using /app/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /app/localhost as it did not pass its verify_file() method
@jhg03a
jhg03a / test.yml
Created February 19, 2021 18:01
Ansible async benchmark playbook
- hosts: localhost
connection: local
gather_facts: no
vars:
# Generally adjustable knobs for testing
sleepTime: 15
iterations: 10
asyncTimeoutOverheadMarginPercent: 20
pollInterval: 5
@jhg03a
jhg03a / foo.ps1
Last active August 9, 2017 00:06
Powershell missing int parameter detection
function testnull {
param([System.Nullable[int]] $testint)
if($testint){
Write-Host "Value was found to be null implicitly"
} else {
Write-Host "Value was found to not be null implicitly"
}
if($testint -eq $null){
Write-Host "Value was found to be null by explicit null comparison"
} else {
| inputlookup mykvstore
| eval _time=strptime(LastUpdate , "%m/%d/%Y %H:%M:%S")
| where _time < relative_time(now(),"-3d")
| eval Keyfield=_key
@jhg03a
jhg03a / puppet.status.check.rb
Created April 14, 2016 17:27
A script to check the combined status of a monolithic puppet enterprise install. Handy for installation automation.
#!/opt/puppetlabs/puppet/bin/ruby
require 'json'
host_cert = `/opt/puppetlabs/bin/puppet config print hostcert`.strip!
host_key = `/opt/puppetlabs/bin/puppet config print hostprivkey`.strip!
puppetca_cert = `/opt/puppetlabs/bin/puppet config print localcacert`.strip!
api_url = "https://localhost:4433"
api_url_8140 = "https://localhost:8140"
exitstatus = 0