Skip to content

Instantly share code, notes, and snippets.

View GETandSELECT's full-sized avatar

Carolyn Butler GETandSELECT

View GitHub Profile
@jauderho
jauderho / gist:6b7d42030e264a135450ecc0ba521bd8
Last active April 20, 2024 18:46
HOWTO: Upgrade Raspberry Pi OS from Bullseye to Bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
@luckylittle
luckylittle / Mock Exam 1.md
Last active March 30, 2024 11:39
Prometheus Certified Associate (PCA)

Mock Exam

1

Q1. The metric node_cpu_temp_celcius reports the current temperature of a nodes CPU in celsius. What query will return the average temperature across all CPUs on a per node basis? The query should return {instance=“node1”} 23.5 //average temp across all CPUs on node1 {instance=“node2”} 33.5 //average temp across all CPUs on node2.

node_cpu_temp_celsius{instance="node1", cpu="0"} 28
node_cpu_temp_celsius{instance="node1", cpu="1"} 19
node_cpu_temp_celsius{instance="node2", cpu="0"} 36
node_cpu_temp_celsius{instance="node2", cpu="1"} 31
@redmcg
redmcg / kubedf
Last active April 23, 2024 18:54
Bash script to show k8s PVC usage
#!/usr/bin/env bash
NODESAPI=/api/v1/nodes
function getNodes() {
kubectl get --raw $NODESAPI | jq -r '.items[].metadata.name'
}
function getPVCs() {
jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\
@ThinGuy
ThinGuy / download_splunk.sh
Last active October 29, 2023 17:13
Download latest Splunk Platform and Universal Forwarder files without having to login
#TODO: Create exclude args for platforms
download-splunk() {
# Where to store the platform and forwarder packages
local SPLUNK_BIN_DIR=/srv/splunk-platform
local SPLUNK_UF_DIR=/srv/splunk-uf
[[ -d ${SPLUNK_BIN_DIR} ]] || mkdir -p ${SPLUNK_BIN_DIR}
[[ -d ${SPLUNK_UF_DIR} ]] || mkdir -p ${SPLUNK_UF_DIR}
@sheilnaik
sheilnaik / aws_cloud_practitioner_notes.md
Created October 26, 2018 03:18
AWS Cloud Practitioner Notes

AWS Cloud Practitioner

What is Cloud Computing?

What is Cloud Computing?

  • On-demand delivery of compute, database storage, applications, other IT resources through cloud platform via Internet
  • Pay-as-you-go pricing

6 Advantages of Cloud Computing

  1. Trade capital expense for variable expense
  • Only pay for what you use
@jasoet
jasoet / kube_cheat_sheet.md
Created March 9, 2018 03:02
Kubernetes Cheat Sheet
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active April 25, 2024 15:17
Hyperlinks in Terminal Emulators
@rgl
rgl / wait_for_http_200.sh
Last active March 7, 2024 17:08
Wait for an HTTP endpoint to return 200 OK with Bash and curl
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done'
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76
= Resources =
* zsh - http://www.zsh.org/
* ZSH-LOVERS - http://grml.org/zsh/zsh-lovers.html
* manual - http://zsh.sourceforge.net/Doc/Release/index.html
* oh-my-zsh - https://github.com/robbyrussell/oh-my-zsh
* prezo - https://github.com/sorin-ionescu/prezto
* zsh-users - https://github.com/zsh-users
= Functions =