Skip to content

Instantly share code, notes, and snippets.

View v1k0d3n's full-sized avatar
🎧
Give me a soft subtle mix, and if ain't broke then don't try to fix it

Brandon B. Jozsa v1k0d3n

🎧
Give me a soft subtle mix, and if ain't broke then don't try to fix it
View GitHub Profile
@v1k0d3n
v1k0d3n / build-qcow2.nix
Created October 9, 2024 00:48 — forked from tarnacious/build-qcow2.nix
Build a bare bones bootable nixos qcow2 image suitable for running with libvirt/qemu/kvm.
{ config, lib, pkgs, ... }:
with lib;
{
imports =
[
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
./machine-config.nix
];
@v1k0d3n
v1k0d3n / README.md
Last active September 4, 2024 15:38
Redfish Helper Script

Redfish Helper Script

This is just a crude, simple script to help users run the most basic of Redfish commands like power On/Off the system, and mount ISO files (via web URL). The only tools required to run this script are curl and jq (for json pretty printing and better json readability). The script will also allow users to explore Redfish API endpoints, which is my primary use for it.

Leave questions or comments below. I'm happy to take suggestions if anyone really finds it useful. For the most part, I'm going to suggest better tooling as this script is just supposed to be pretty basic. This tool is supposed to be a butter-knife, not a scalpel.

Usage:

curl -L https://gist.githubusercontent.com/v1k0d3n/252d6761e041043f1a88910f8c79fabf/raw/f4cef77613fac2450f929814d377bc55b318f570/redfish-helper.sh -o redfish-helper.sh
@v1k0d3n
v1k0d3n / README.md
Last active October 18, 2024 19:47
Lab Setup for Palo Alto Virtualized Workloads

Prerequisites

Use the Red Hat Console to stand up a bare metal cluster using the Assisted-Installer. Use the following recommendations as you progress the installer:

  • Be sure that your cluster has at least 2 physical interfaces (or more) and that at least one of those interfaces is provided by a supported SR-IOV capable NIC.
  • Be sure that your cluster has 2 physical disks (or more).
  • Be sure that you have a trunked VLAN interface going to one of the two interfaces.
  • Do not install the storage or virtualization operators as part of the installation progress. This these guides will tell you how to install and configure each operator manually. This offers more control and provides admins with a better understanding of how to install and manage these services.

Installation Procedures

@v1k0d3n
v1k0d3n / README.md
Created August 9, 2024 18:17
Get Disk Information

Details

Using oc debug commands, this AI-generated gobbledygook script will collect all of the relevant useful information that can be gathered about attached physical disks. This script will evolve over time, but will use a custom image for running oc debug commands.

While you're here, I would suggest checking out my other dirty hack for getting NIC information!

NOTE: *By default, the variable is used for an SNO. If you want to use another node, just change it to the standard node/<node-name> syntax and this script will work just fine.

NODE_NAME=$(oc get no -o name)
@v1k0d3n
v1k0d3n / README.md
Last active September 18, 2024 13:33
Get Interface Information

Details

Using oc debug commands, this AI-generated gobbledygook script will collect all of the relevant useful information that can be gathered for an SriovNetworkNodePolicy. It's helpful for general NIC information as well.

While you're here, I would suggest checking out my other dirty hack for getting Disk information!

NOTE: *By default, the variable is used for an SNO. If you want to use another node, just change it to the standard node/<node-name> syntax and this script will work just fine.

NODE_NAME=$(oc get no -o name)
@v1k0d3n
v1k0d3n / extract-kubeconfig-acm-created-cluster.sh
Created April 11, 2024 15:59 — forked from dlbewley/extract-kubeconfig-acm-created-cluster.sh
How to extract kubeconfig and kubeadmin password from OpenShift ClusterDeployment using RHACM
#!/bin/bash
# https://guifreelife.com/blog/2021/08/13/RHACM-Recover-Created-Cluster-Credentials-and-Kubeconfig/
#
# If an OpenShift cluster was created by RHACM this script will extract the
# kubeconfig and the default kubeadmin credentials.
#
# Prereqs:
# - Authenticated to hub cluster
# - Managed cluster name is the sames as the hosting namespace on hub cluster
@v1k0d3n
v1k0d3n / setup-keycloak.md
Created March 16, 2024 17:22 — forked from KiranMantha/setup-keycloak.md
Setup keycloak

Keycloak setup

  • install docker
  • in order to run keycloak in a docker container, run the below command:
docker run -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:latest start-dev

If you are using podman then just replace docker with podman in above bash command

@v1k0d3n
v1k0d3n / README.md
Last active February 15, 2024 18:34
Creating Certificates for Demo PoC

Overview

This is just a simple script that I use to generate self-signed certificates. It's suited for general use of course, however it also includes v3 extensions which are required for container registries like Quay. This is my "easy button" for PoCs that can use temporary self-signed certificates.

Useage

  1. Download the script
    curl -L https://gist.githubusercontent.com/v1k0d3n/08b9a1d37a06e90ff39646e1b09417d8/raw/certgen.sh -o certgen.sh
    
  2. Make it executable
@v1k0d3n
v1k0d3n / README.md
Last active December 20, 2023 16:40
MacOS Homebrew upgrade/installation compinit issues

You may run into an issue (at some point) where your directories are "insucure" either through a homebrew install or update. If this happens, you can do the following to fix the issue correctly, wihtout setting compinit to ignore errors (which I've seen recommended in some forums).

Example:

Last login: $D $MO $H:$M%S on $TTYS

[WARNING]: Console output during zsh initialization detected.

When using Powerlevel10k with instant prompt, console output during zsh
initialization may indicate issues.
@v1k0d3n
v1k0d3n / 01_NieR_FAR.md
Created November 14, 2023 14:49 — forked from MiyacoGBF/01_NieR_FAR.md
How to Install FAR, HD Texture Pack, and ReShade (GShade) for NieR:Automata on Linux