nmcli con add type wifi conn.id "John Hotspot" \
conn.interface-name wlp0s20f0u1 \
conn.autoconnect no \
wifi.mode ap \
wifi.band a \
wifi.channel 32 \
wifi.ssid "John Hotspot" \
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gist.github.com/thomasdarimont/46358bc8167fce059d83a1ebdb92b0e7?permalink_comment_id=5139846#gistcomment-5139846 | |
function jwt_decode(){ | |
jq -R 'split(".") | .[1] | @base64d | fromjson | | |
# you can replace the "localtime" with "gmttime" if that makes sense | |
if .exp then (.expStr = (.exp | localtime | strftime("%Y-%m-%dT%H:%M:%S %Z"))) else . end | | |
if .iat then (.iatStr = (.iat | localtime | strftime("%Y-%m-%dT%H:%M:%S %Z"))) else . end | | |
if .nbf then (.nbfStr = (.nbf | localtime | strftime("%Y-%m-%dT%H:%M:%S %Z"))) else . end | | |
.' <<< "$1" | |
} |
This is hacky because there are at least three different ways to set the VM's memory.
.spec.template.spec.domain.memory.guest
.spec.instancetype.name
.spec.template.spec.domain.resources.requests.memory
oc get vm -A -o go-template='{{range .items}}{{.metadata.name}}{{"\t"}} {{.status.printableStatus}}{{"\t"}} {{.spec.template.spec.domain.memory.guest}} {{.spec.instancetype.name}}{{"\t"}} {{.spec.template.spec.domain.resources.requests.memory}}{{"\n"}}{{end}}'
rhel-9-amber-limpet-47 Running <no value> u1.medium <no value>
test103 Running 8Gi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: windows2k22-autounattend | |
data: | |
autounattend.xml: | | |
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"> | |
<servicing> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### This is a little script to help me install / rotate Cockpit certificates | |
#!/bin/bash | |
CERT_PKCS7=$(hostname -f).pkcs7 | |
CERT_PEM=$(hostname -f).pem | |
KEY=$(hostname -f).key | |
DEST=/etc/cockpit/ws-certs.d/$(hostname -f).cert | |
[ -f $CERT_PKCS7 ] || echo "Certificate file not found: $CERT_PKCS7" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
shopt -s nullglob | |
for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V); do | |
echo "IOMMU Group ${g##*/}:" | |
for d in $g/devices/*; do | |
echo -e "\t$(lspci -nns ${d##*/})" | |
done; | |
done; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
kind: ImageSetConfiguration | |
apiVersion: mirror.openshift.io/v1alpha2 | |
storageConfig: | |
registry: | |
imageURL: jcall-testing.dota-lab.iad.redhat.com:8443/oc-mirror/oc-mirror-metadata | |
mirror: | |
platform: | |
graph: true # this requires a download from github.com | |
channels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kicstart created by John Call | |
# Installs RHEL8 via HTTP | |
url --url="http://rhdata6/rhel8/" | |
graphical | |
lang en_US.UTF-8 | |
firstboot --disable | |
rootpw --plaintext My-Password-123 | |
services --enabled="chronyd" | |
timezone America/New_York --isUtc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.openshift.com/container-platform/4.11/networking/k8s_nmstate/k8s-nmstate-updating-node-network-config.html | |
apiVersion: nmstate.io/v1 | |
kind: NodeNetworkConfigurationPolicy | |
metadata: | |
name: node1 | |
spec: | |
nodeSelector: | |
kubernetes.io/hostname: node1.example.com | |
desiredState: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### ACL for Approved/Allowed sites, insert below this line in default config | |
#acl CONNECT method CONNECT | |
acl Approved_Sites dstdomain "/etc/squid/Approved_Sites.txt" | |
http_access deny !Approved_Sites | |
http_access allow Approved_Sites | |
### Force this proxy to use another proxy | |
#cache_peer hostname type http_port icp_port options |
NewerOlder