Skip to content

Instantly share code, notes, and snippets.

View r10r's full-sized avatar

Ruben Jenster r10r

  • Drachenfels GmbH
  • Pforzheim
View GitHub Profile
@r10r
r10r / mwd.sleepMac.plist
Created December 4, 2023 20:25 — forked from dusenberrymw/mwd.sleepMac.plist
Automatically force OS X / macOS to sleep when the battery is low (script + plist).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>mwd.sleepMac</string>
<key>ProgramArguments</key>
<array>
<string>/path/to/sleepMac.sh</string>
</array>
@r10r
r10r / bash_strict_mode.md
Created August 29, 2023 15:20 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
Aspect or Feature kubernetes/ingress-nginx nginxinc/kubernetes-ingress with NGINX nginxinc/kubernetes-ingress with NGINX Plus
Fundamental
Authors Kubernetes community NGINX Inc and community NGINX Inc and community
NGINX version Custom NGINX build that includes several third-party modules NGINX official mainline build NGINX Plus
Commercial support N/A N/A Included
Implemented in Go/Lua (while Nginx is written in C) Go/Python Go/Python
Load balancing configuration via the Ingress resource
@r10r
r10r / migrate.configmap.yaml
Created June 6, 2023 08:56 — forked from deefdragon/migrate.configmap.yaml
Migrating Kubernetes PVC/PVs from one storage class to another
apiVersion: v1
kind: ConfigMap
metadata:
# any name can be used; Velero uses the labels (below)
# to identify it rather than the name
name: change-storage-class-config
# must be in the velero namespace
namespace: velero
# the below labels should be used verbatim in your
# ConfigMap.
@r10r
r10r / rawmode.vim
Created April 1, 2022 14:46
VIM script to toggle `"RAW"` mode.
function! ToggleRawMode()
let notraw = ((&signcolumn != 'no') || &number || &conceallevel)
if notraw
let b:signcolumn_saved=&signcolumn
set signcolumn=no
let b:conceallevel_saved=&conceallevel
@r10r
r10r / .sleep
Last active October 27, 2024 18:55
macOS sleepwatcher scripts
# Turn of bluetooth before sleep
/usr/local/bin/blueutil -p 0
@r10r
r10r / Dockerfile
Created January 13, 2022 09:58 — forked from hermanbanken/Dockerfile
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@r10r
r10r / kubernetes-cheatsheet.md
Created October 12, 2021 20:01 — forked from jonashackt/kubernetes-cheatsheet.md
Kubernetes cheat sheet
@r10r
r10r / runc_with_tty.md
Created October 7, 2021 07:03 — forked from jzaccone/runc_with_tty.md
Start runC container with TTY Device

About

recvtty is a reference implementation of a consumer of runC's --console-socket API. It is automatically built when doing a make on the runc project.

Prereq

These instructions were tested on Ubuntu 16.04. Also go, git are required.

Install runC

go get github.com/opencontainers/runc
cd $GOPATH/src/github.com/opencontainers/runc