Skip to content

Instantly share code, notes, and snippets.

View tschegy's full-sized avatar

Radek Cegan tschegy

View GitHub Profile
@tschegy
tschegy / curl_notes.txt
Created February 16, 2023 12:44 — forked from tuxfight3r/curl_notes.txt
openshift rest api login / json patch via curl
#Login to openshift and retrieve token
curl -u admin -kv -H "X-CSRF-Token: xxx" \
'https://master.cluster.local:8443/oauth/authorize?client_id=openshift-challenging-client&response_type=token'
#It should give you a bearer token like this
https://master.cluster.local:8443/oauth/token/implicit#access_token=aRVmsEHbUEhd4WeP2bctj0n57ogHMBvOIcrtjc7tCw4&expires_in=86400&scope=user%3Afull&token_type=Bearer
TOKEN="aRVmsEHbUEhd4WeP2bctj0n57ogHMBvOIcrtjc7tCw4"
#Get a configmap named configmaptest
@tschegy
tschegy / hostapd.conf
Created April 27, 2022 12:51 — forked from nickpegg/hostapd.conf
My hostapd config
# Set up some logging. VERY useful to see why things aren't working.
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
# Which interface to use and which bridge to join
interface=wlan0
bridge=br0
@tschegy
tschegy / ocpv4-expired-cert-recovery.sh
Last active February 9, 2021 12:06 — forked from ryran/ocpv4-expired-cert-recovery.sh
OCPv4: recover from expired control plane certificates
#!/bin/bash
#
# This extremely rough nonsense is an attempt to automate the disaster recovery
# expired certs documentation published at
# https://docs.openshift.com/container-platform/4.1/disaster_recovery/scenario-3-expired-certs.html
# ... Which was last reviewed on 2019/06/10
#
# Please contact [email protected] with suggestions or corrections
# CUSTOMIZE THESE: