Skip to content

Instantly share code, notes, and snippets.

@nielsole
nielsole / thermalert
Last active June 27, 2024 09:27
Thermalert continuously monitors temperature of a mac.
#!/bin/bash
while true; do
# Get the current CPU_Speed_Limit value
CPU_SPEED_LIMIT=$(pmset -g therm | grep "CPU_Speed_Limit" | awk '{print $3}')
# Check if CPU_Speed_Limit is less than 80
if (( CPU_SPEED_LIMIT < 80 )); then
# Send notification
osascript -e 'display notification "CPU Speed Limit is below 80%: '"$CPU_SPEED_LIMIT"'%" with title "CPU Speed Alert" sound name "Funk"'
Temial Drei Minzen
Temial Rote Beeren
Temial Rote Beeren
VORWERK2AE4OYFR22MLAALBLERXBT6NQW3U75HLABUUPGCJ6QCFB2OOEVX3WGEH4TTZ2NPGC7A4WG2YABGSRPWJJ7Q
VORWERK2AE4ALRZJVMOAAJJLEQBKVKB4XSQ46LY2GYL4GRHNU4HTDXWDLRWHIC6SRSPLXV4YMFLB2QXDIRLASWNAWQ
VORWERK2AE4AFRZJVMOAAJJLETB2NFLA3F5UQ5Y2FUWCH44GCU2DFG2NEDS7SURRYP4FBKGOPVS67BVQCQBN2VQGME
Temial Drei Minzen 1 Aufguss, 500ml
Temial Rote Beeren 1 Aufguss, 500ml
#!/bin/bash
# Check if a parameter has been supplied
if [ $# -eq 0 ] || [ "$1" = "-h" ]; then
echo "Usage: $0 <path_to_ca_bundle>"
echo "Displays the certificate that expires next in the provided CA bundle."
echo "The path to the CA bundle must be the first parameter."
exit 1
fi
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
labels:
istio.io/rev: 1-12
name: tls-mtls-routing-lua
namespace: wf-istio-decentralized-ingressgateway
spec:
workloadSelector:
labels:
@nielsole
nielsole / haproxy.cfg
Created June 3, 2018 20:27
Haproxy for ingress
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
version: '2'
services:
app:
image: nielsole/ml1:v1
volumes:
- ./data/:/data
command: ["ipython", "notebook", "--ip=0.0.0.0"]
ports:
- "8888:8888"
@nielsole
nielsole / convert id_rsa to pem
Created June 2, 2016 14:57 — forked from mingfang/convert id_rsa to pem
Convert id_rsa to pem file
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem
chmod 700 id_rsa.pem
@nielsole
nielsole / nginx-openresty-ubuntu-build-dependencies.sh
Last active May 24, 2016 20:02 — forked from markselby/nginx-openresty-ubuntu-build-dependencies.sh
Build Nginx OpenResty version on Ubuntu.This is part of the high performance caching blog on writebox.co.uk
# Build dependencies for OpenResty.
sudo apt-get install build-essential libpcre3-dev libssl-dev libgeoip-dev libgd-dev
# Install standard Nginx first so that you get the relevant service scripts installed too
sudo apt-get install nginx
# If you want to access Postgres via Nginx
sudo apt-get install libpq-dev