Skip to content

Instantly share code, notes, and snippets.

@mkol5222
mkol5222 / Get-AzLastCall.ps1
Created January 29, 2024 05:53 — forked from s4parke/Get-AzLastCall.ps1
Get the last caller from the ActivityLog on a resource or resource group. Useful to find who what & when.
function Get-AzLastCall {
<#
.SYNOPSIS
Get the last caller from the ActivityLog on a resource or resource group.
Useful to find who what & when.
.DESCRIPTION
Inputs: ResourceGroupName (required) and ResourceName (optional).
Outputs: Array-list of PSEvent Objects
@mkol5222
mkol5222 / mount_vmdk.sh
Created January 28, 2024 22:21 — forked from janstarke/mount_vmdk.sh
Mount vmdk files
#!/bin/bash
display_usage() {
echo "$0 <dir with vmdk files>" >&2
}
exit_with_error() {
MSG="$1"
echo "$MSG" >&2
exit 1
---
extension_requests:
pp_preshared_key: "${psk}"
@mkol5222
mkol5222 / jwt-decode.sh
Created January 25, 2024 16:04 — forked from angelo-v/jwt-decode.sh
Decode a JWT via command line
# will not work in all cases, see https://gist.github.com/angelo-v/e0208a18d455e2e6ea3c40ad637aac53#gistcomment-3439904
function jwt-decode() {
sed 's/\./\n/g' <<< $(cut -d. -f1,2 <<< $1) | base64 --decode | jq
}
JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
jwt-decode $JWT
@mkol5222
mkol5222 / setup_new_ubuntu_env.sh
Created January 23, 2024 16:58 — forked from mathieu-benoit/setup_new_ubuntu_env.sh
setup_new_ubuntu_env.sh
#!/bin/bash
sudo apt update -y
sudo apt upgrade -y
# jq
echo "Installing jq..."
sudo apt install jq -y
# helm

Test notary v2

Start local test registry on localhost:5000

docker run --rm -d -p 5000:5000 -v "$(pwd)"/registry:/var/lib/registry --name registry ghcr.io/oras-project/registry:latest

Install oras

@mkol5222
mkol5222 / gitlab.md
Created January 23, 2024 16:23 — forked from eana/gitlab.md
Output Terraform Plan information into a merge request

Output Terraform Plan information into a merge request

Add terraform plan output to merge requests and expose details from terraform plan runs directly into a merge request widget enabling you to see statistics about the resources that Terraform creates, modifies, or destroys.

@mkol5222
mkol5222 / notes.md
Created January 21, 2024 19:14 — forked from mbwhite/notes.md
Connecting VSCode to Multipass VM (Windows)
multipass launch --name fabric-dev --disk 80G --cpus 8 --mem 8G --cloud-init https://raw.githubusercontent.com/hyperledgendary/full-stack-asset-transfer-guide/main/infrastructure/multipass-cloud-config.yaml
  • Find out the IP address of the machines thats created - multipass list will show you this. For example
@mkol5222
mkol5222 / aro4_install.sh
Created January 17, 2024 10:52 — forked from rcarrata/aro4_install.sh
Aro OCP4 quickly installation
#!/bin/bash
## USAGE
function usage() {
echo
echo "Usage:"
echo " $0 [command] [options]"
echo " $0 --help"
echo
echo "Example:"
@mkol5222
mkol5222 / ARO - Shell Script
Created January 17, 2024 10:51 — forked from aymenabdelwahed/ARO - Shell Script
ARO - Terraform main file
#!/bin/bash
########################################################
#Enable the account subscription
SUBSCRIPTION_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
az account set --subscription $SUBSCRIPTION_ID
if [ $? -eq 0 ]; then
echo "Account set to subscription: " $SUBSCRIPTION_ID
fi