Skip to content

Instantly share code, notes, and snippets.

View orrymr's full-sized avatar

Orry orrymr

View GitHub Profile
n_ <- 2000
m_ <- 10000
g <- ggplot(roll(m = m_, n = n_),
mapping = aes(x = V1)) +
geom_vline(xintercept = 3.5, colour = "tomato3") +
labs(
subtitle = str_interp('Density of means of dice
rolls for ${n_} dice over ${m_} rolls.'),
x = 'Mean Score',
@orrymr
orrymr / cpUtil.sh
Created October 23, 2024 19:59
CPU Utilization Tool
#!/bin/bash
display_cpu_util() {
while true; do
cpu_util=$(sar -u 1 1 | awk '/^Average:.*all/ {print 100-$NF}')
dialog --title "CPU Utilization" --infobox "CPU Utilization: $cpu_util %" 5 40
done
}
display_cpu_util