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 / 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
@v1k0d3n
v1k0d3n / README.md
Last active August 19, 2023 16:04
Defragging Etcd in OpenShift (if needed)

NOTE: These proceedures are only for OpenShift SNO-Deployments. I will create a loop command later for multi-node environments.

❯ oc get pods -n openshift-etcd | grep etcd
etcd-itamae                4/4     Running     20         8d

ETCD_SNO_ENDPOINT=$(oc get pods -n openshift-etcd | grep etcd | awk '{print $1}')
echo $ETCD_SNO_ENDPOINT

Overview

For anyone doing remote lab work or demonstrations which include jump servers, this is your new best friend.

Installation

In MacOS, you can simply use brew to install sshuttle:

brew install sshuttle

Or on any other system, you can simply use python-pip3:

@v1k0d3n
v1k0d3n / README.md
Last active October 10, 2022 14:02 — forked from koshatul/README.md
Tips (macOS): Use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
@v1k0d3n
v1k0d3n / 1-setup.md
Created September 30, 2022 19:27 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS

Methods of Signing with a GPG Key on MacOS

Last updated September 21, 2022

This Gist explains how to do this using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

There has been a number of comments on this gist regarding some issues around the pinentry-program and M1 Macs. I've finally gotten a chance to try things out on an M1 and I've updated the documentation in 2-using-gpg.md to reflect my findings.

#!/usr/bin/env bash
# Loads and mounts an ISO over SMB via the
# SuperMicro IPMI web interface
#
# usage: supermicro-mount-iso.sh <ipmi-host> <smb-host> <path>
# e.g.: supermicro-mount-iso.sh 10.0.0.1 10.0.0.2 '\foo\bar\windows.iso'
set -x