Skip to content

Instantly share code, notes, and snippets.

View amdprophet's full-sized avatar
🏠
Working from home

Justin Kolberg amdprophet

🏠
Working from home
View GitHub Profile
@amdprophet
amdprophet / apply_to_idrac.bat
Created June 7, 2022 15:47 — forked from Alex4386/apply_to_idrac.bat
iDRAC 6 SSL Certificate Deploy Tool - with certbot
@echo off
echo Dell iDRAC 6 SSL Key upload system
echo.
echo ===[credentials]===
set default_hostname=your.idrac.address
rem Host Section
set /p host="Host (Default. %default_hostname%): "
IF NOT DEFINED host (

HMC Basic Commands

Show managed frames attached to a hmc

lssyscfg -r sys -F name:type_model:serial_num

Show managed lpars attached to a frame

lssyscfg -m  -r lpar -F name
@amdprophet
amdprophet / embedded.go
Created June 29, 2021 20:00 — forked from joshrotenberg/embedded.go
embedded nsqd
package main
// This is a basic example of running an nsqd instance embedded. It creates
// and runs an nsqd with all of the default options, and then produces
// and consumes a single message. You are probably better off running a
// standalone instance, but embedding it can simplify deployment and is
// useful in testing.
// See https://github.com/nsqio/nsq/blob/master/nsqd/options.go and
// https://github.com/nsqio/nsq/blob/master/apps/nsqd/nsqd.go for
@amdprophet
amdprophet / rem_proxmox_popup.sh
Created May 27, 2021 18:43 — forked from tavinus/rem_proxmox_popup.sh
Remove PROXMOX 5.x / 6.x subscription message popup
#!/bin/sh
#######################################################
#
# Edits the proxmox Subscription file to make it
# think that it has a Subscription.
#
# Will disable the annoying login message about
# missing subscription.
#
@amdprophet
amdprophet / reset-iptables.sh
Created May 14, 2021 19:17 — forked from x-yuri/reset-iptables.sh
Reset iptables
#!/usr/bin/env bash
set -eu
declare -A chains=(
[filter]=INPUT:FORWARD:OUTPUT
[raw]=PREROUTING:OUTPUT
[mangle]=PREROUTING:INPUT:FORWARD:OUTPUT:POSTROUTING
[security]=INPUT:FORWARD:OUTPUT
[nat]=PREROUTING:INPUT:OUTPUT:POSTROUTING
)
for table in "${!chains[@]}"; do
@amdprophet
amdprophet / sparc-set-mac-address.md
Last active September 2, 2023 06:52
Setting the hostid and MAC address in eprom
#!/bin/sh
### BEGIN INIT INFO
# Provides: sensu-agent
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start sensu-agent
# Description: Enable the Sensu Agent service
### END INIT INFO
#!/bin/bash
TOKEN="YOUR_TOKEN_HERE" # The API v2 OAuth token
ACCOUNT_ID="YOUR_ACCOUNT_ID_HERE" # Replace with your account ID
ZONE_ID="example.com" # The zone ID is the name of the zone (or domain)
RECORD_ID="42424242" # Replace with the Record ID
IP=`curl -s -4 v4.ifconfig.co` # or provide your own value
curl -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-X "PATCH" \
# golang.org/x/sys/unix
../go/pkg/mod/golang.org/x/sys@v0.0.0-20191113165036-4c7a9d0fe056/unix/dirent.go:16:5: error: reference to undefined name 'isBigEndian'
16 | if isBigEndian {
| ^
../go/pkg/mod/golang.org/x/sys@v0.0.0-20191113165036-4c7a9d0fe056/unix/dirent.go:81:41: error: use of undefined type 'Dirent'
81 | const namoff = uint64(unsafe.Offsetof(Dirent{}.Name))
| ^
../go/pkg/mod/golang.org/x/sys@v0.0.0-20191113165036-4c7a9d0fe056/unix/fdset.go:10:12: error: use of undefined type 'FdSet'
10 | func (fds *FdSet) Set(fd int) {
| ^
x/sys changes: https://github.com/sensu/sys/commit/87f248f2c08c11b3880f9244904f353a4252fb32
➜ sensu-go git:(solaris-gccgo) go build -compiler gccgo ./cmd/sensu-agent
# golang.org/x/sys/unix
In file included from /usr/include/sys/select.h:27,
from /usr/include/sys/types.h:665,
from /usr/include/string.h:15,
from cgo-gcc-prolog:31:
/usr/include/sys/time.h:378:5: error: conflicting types for 'adjtime'
378 | int adjtime(struct timeval *, struct timeval *);