Skip to content

Instantly share code, notes, and snippets.

View mhausenblas's full-sized avatar
🤷‍♂️
weeks of coding can save you hours of planning!

Michael Hausenblas mhausenblas

🤷‍♂️
weeks of coding can save you hours of planning!
View GitHub Profile
@mhausenblas
mhausenblas / README.md
Last active January 11, 2018 20:45
My favs kubectl commands

Docs and config

What was that field in the manifest again?

$ kubectl explain statefulset.spec.template.spec

List contexts:

@ErikAugust
ErikAugust / spectre.c
Last active January 5, 2025 07:01
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@saidsef
saidsef / lambda_cpu_cores.md
Last active December 12, 2024 12:21
AWS Lambda CPU Cores
@itaysk
itaysk / prepull.yaml
Last active January 26, 2024 17:37
Kubernetes: Pre-pull images into node (moved to: https://github.com/itaysk/kube-imagepuller )
###
# There's a newer version available here:
# https://github.com/itaysk/kube-imagepuller
# All future updates will be made there.
# Please also post you questions as issues on that repo instead of commenting here
###
apiVersion: apps/v1beta2
kind: DaemonSet
#
# Allow users to read the istio config map
#
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
name: istio-configmap-viewer
namespace: istio-system
rules:
- resources: ["configmaps"]
@VladimirPal
VladimirPal / neomuttrc
Last active May 15, 2025 09:56
Minimal neomutt config for gmail imap
set imap_user="[email protected]"
set imap_pass=`/usr/bin/security find-generic-password -w -a '[email protected]' -s 'Gmail'`
set folder=imaps://imap.gmail.com/
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
# https://www.neomutt.org/guide/reference search sleep_time for additional info
set sleep_time=0 # be faster
@mhausenblas
mhausenblas / jump.yaml
Last active August 28, 2017 08:03
A jump box pod for Kubernetes troubleshooting, use `kubectl exec jump -c busybox -i -t -- sh` to connect to it
apiVersion: v1
kind: Pod
metadata:
name: jump
spec:
containers:
- name: busybox
image: busybox
command:
- sleep
@mosquito
mosquito / README.md
Last active April 13, 2025 18:03
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@calebamiles
calebamiles / notes.md
Last active February 1, 2021 15:53
Notes on Open Source Governance Models

Node.js Foundation

  • Healthy Open Source
    • explicit goal to be a lightweight process
    • concrete ability to scale to hundreds of contributors
    • good fundamental goals
      • transparency
      • participation
      • efficacy
    • ecosystem projects encouraged but not required to adopt foundation governance templates
  • creation of projects under TSC explicity delegates authority from TSC to project TC
@ageis
ageis / systemd_service_hardening.md
Last active May 14, 2025 22:12
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict