Skip to content

Instantly share code, notes, and snippets.

View nickboldt's full-sized avatar

Nick Boldt nickboldt

View GitHub Profile
@nickboldt
nickboldt / dsc-update.sh
Created October 26, 2023 13:51
update dsc from a newer quay tag
#!/bin/bash
if [[ $1 ]]; then
DSC_VERSION="${1}"
else
DSC_VERSION="next"
fi
cd /tmp || exit;
curl -sSLO https://raw.githubusercontent.com/redhat-developer/devspaces-chectl/devspaces-3-rhel-8/build/scripts/installDscFromContainer.sh; chmod +x installDscFromContainer.sh
./installDscFromContainer.sh "quay.io/devspaces/dsc:${DSC_VERSION}" -t $HOME --verbose
@nickboldt
nickboldt / vm-config.adoc
Last active September 28, 2023 15:35
F36 VM configuration (2022-07-30 - 08-16)

Virtual Box Fedora 36 virutal machine setup

VBox settings

Base memory: 16384 MB
Chip PIIX3
[x] Enable IO APIC
[ ] Enable EFI
[x] Hardware clock UTC
@nickboldt
nickboldt / icsp-quay.io.sh
Created September 19, 2023 15:11
Apply an Image Content Source Policy for registry.redhat.io --> quay.io for installing RH DH unreleased CI builds
TMPDIR=/tmp
for ICSP_URL in quay.io/rhdh/; do
ICSP_URL_PRE=${ICSP_URL%%/*}
# echo "[DEBUG] ${ICSP_URL_PRE}, ${ICSP_URL_PRE//./-}, ${ICSP_URL}"
echo "apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
name: ${ICSP_URL_PRE//./-}
spec:
@nickboldt
nickboldt / verify.rhpib.pullable.sh
Created September 18, 2023 20:46
verify RHPIB bundles are pullable from RH registry
yarn config set "@redhat:registry" https://npm.registry.redhat.com
rm -fr /tmp/rhpib; mkdir /tmp/rhpib; cd /tmp/rhpib
for d in \
@redhat/backstage-plugin-acr @redhat/backstage-plugin-argo-cd @redhat/backstage-plugin-argo-cd-backend \
@redhat/backstage-plugin-jfrog-artifactory @redhat/backstage-plugin-keycloak-backend \
@redhat/backstage-plugin-quay @redhat/backstage-plugin-tekton @redhat/backstage-plugin-topology\
@redhat/shared-react; do \
yarn add $d 2> >(grep -v warning 1>&2); \
done
# for incorrectly taggged images:
brew untag devspaces-3.9-rhel-8-container-candidate \
devspaces-configbump-rhel8-container-3.10-4 \
devspaces-imagepuller-rhel8-container-3.10-2 \
devspaces-machineexec-rhel8-container-3.10-2 \
devspaces-traefik-rhel8-container-3.10-2
@nickboldt
nickboldt / gtk.css.txt
Last active September 2, 2023 18:17
Theme parsing error: gtk.css: Not using units is deprecated
# if you're getting errors like this:
# (java:706): Gtk-WARNING **: Theme parsing error: gtk.css:70:18: Not using units is deprecated. Assuming 'px'.
# (java:706): Gtk-WARNING **: Theme parsing error: gtk.css:70:20: Not using units is deprecated. Assuming 'px'.
# here's a workaround:
# as root
cd /usr/share/themes/
@nickboldt
nickboldt / git.rebase.noninteractive.sh
Created August 22, 2023 17:03
non-interactive interactive rebase to squash or fixup
# squash this commit into the previous one, using non-interactive interactive rebase
# https://stackoverflow.com/questions/12394166/how-do-i-run-git-rebase-interactive-in-non-interactive-manner
# merge commits but keep comments
GIT_EDITOR="sed -i -e 's/BAD/BAD/g'" GIT_SEQUENCE_EDITOR="sed -i -re '2,\$s/^pick /s /'" git rebase -i
# merge commits and drop comment
GIT_EDITOR="sed -i -e 's/BAD/BAD/g'" GIT_SEQUENCE_EDITOR="sed -i -re '2,\$s/^pick /f /'" git rebase -i
@nickboldt
nickboldt / gist:8e3d47c35e5c9e9e084d0d14759547cc
Created May 16, 2023 02:40
FB groups for crossposting MTA stuff
Residents of West Petpeswick: https://www.facebook.com/groups/1408442299320003/
Residents Of East Petpeswick: https://www.facebook.com/groups/190127918090806/
Musquodoboit Harbour: https://www.facebook.com/groups/musquodoboitharbour
Friends of the Gaetz Brook Greenway: https://www.facebook.com/groups/ATShore/
What's Happening in Meaghers Grant: https://www.facebook.com/groups/320143741498650
Musquodoboit Harbour, Jeddore and Porters Lake: https://www.facebook.com/groups/226092338183269/
Porters Lake Community Connection: https://www.facebook.com/groups/porterslakecommunity/
HIKING WITH DOGS IN NOVA SCOTIA: https://www.facebook.com/groups/380761668726933/
East Coast hiking Adventures group: https://www.facebook.com/groups/1171449999881399/
Halifax Trail Talk - Nova Scotia Hiking, Biking & Paddling Enthusiasts: https://www.facebook.com/groups/hfxtrailtalk/
@nickboldt
nickboldt / getbundle.sh
Last active May 10, 2023 19:45
olm catalog source - get bundle for channel
podman run -p 50051:50051 brew.registry.redhat.io/rh-osbs/iib:$IIB_NUMBER &
oc login --server=https://api.$YOUR_CLUSTER.com:6443 -u=$YOUR_USER -p=$YOUR_PWD --insecure-skip-tls-verify
oc port-forward $(oc get pods -n openshift-marketplace -l olm.catalogSource=$YOUR_CATALOG_SOURCE -o name) -n openshift-marketplace 50051 &
# grpcurl is needed to be installed locally
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
GO_BIN=~/go
export PATH=${PATH%":${GO_BIN}/bin"}:${GO_BIN}/bin
#!/bin/bash
if [[ $1 ]]; then
DSC_VERSION="${1}-CI"
else
DSC_VERSION="3.7.0-CI"
fi
DSC_ARCH="linux-x64"
DSC_HOME=${HOME}/.dsc; mkdir -p "${DSC_HOME}"
DSC_TGZ_URL="https://github.com/redhat-developer/devspaces-chectl/releases/download/${DSC_VERSION}-dsc-assets/devspaces-${DSC_VERSION%-*}-dsc-${DSC_ARCH}.tar.gz"