Skip to content

Instantly share code, notes, and snippets.

View kirrmann's full-sized avatar

Stefan Kirrmann kirrmann

  • lastminute.com
  • Munich
View GitHub Profile
#!/usr/bin/env bash
#
# This script ports deployed Helm v2 Packages from k8s API v1.15 to 1.16
#
# When upgrading K8s clusters to a new minor API version it is possible that
# already deprecated API Endpoints are removed e.g.,
# extensions/v1beta1/DaemonSet
# K8s handles this transparently for already deployed ressources from the
# deprecated paths, making them available via their new API. They are no longer
# available through the removed paths though.
@jhohertz
jhohertz / prometheus-extra-etcd-instance.yaml
Created November 15, 2018 20:55
Enable prometheus monitoring of etcd and etcd-events on kops clusters
# To be used with current stable/prometheus-operator helm chart on kops clusters
# where 4001/4002 ports are blocked from the worker nodes
#
# In you helm, disable etcd monitor by setting kubeEtcd.enabled=false
# Then apply this yaml, and you should see the etcd stats on your main instance
#
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus-operator-prometheus-master
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active November 3, 2025 04:13
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@mgoodness
mgoodness / k8s-svc-annotations.md
Last active September 7, 2024 16:25
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
#cloud-config
ssh_authorized_keys:
- ssh-rsa xyz
write_files:
- path: /var/lib/rancher/conf/cloud-config.yml
permissions: "0644"
owner: root
content: |
#cloud-config
ssh_authorized_keys:
@imevro
imevro / gist:edfe9dea12196056467f
Last active June 18, 2024 08:44
Clean up all cached pages in prerender.io from console
var cleanUp = function() {
$.ajax({method: "GET", url: "https://prerender.io/api/cached-pages?page=0&pageSize=1000000"}).success(function(response) {
var total = response,
lastChecked = 1;
console.log("total: " + response.length);
for(var i = 0; i < total.length; i++) {
$.ajax({
method: "DELETE",
@brycied00d
brycied00d / gist:564dbadead55dd3b8414
Created November 24, 2014 18:18
nginx redirect to the FQDN with an alternative port
server {
listen 80; ## listen for ipv4; this line is default and implied
listen [::]:80 default_server ipv6only=on; ## listen for ipv6
server_name localhost; # A sane default, nobody cares
# The actual logic
set $this_host $host;
if ($host !~* "\.fqdn\.com$") {
#rewrite ^ https://$host.fqdn.com:8006$request_uri? permanent;
set $this_host "$host.fqdn.com";
}
@wvengen
wvengen / extend.sh
Last active September 27, 2025 02:40
Extend non-HiDPI external display above HiDPI internal display
#!/bin/sh
# extend non-HiDPI external display on DP* above HiDPI internal display eDP*
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1`
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
@mikefaille
mikefaille / Fed_install_3.7_rc6_krnl
Created November 20, 2012 02:36
Fedora install kernel 3.7 rc6 x64
sudo yum install http://kojipkgs.fedoraproject.org//packages/kernel/3.7.0/0.rc6.git1.1.fc19/x86_64/kernel-3.7.0-0.rc6.git1.1.fc19.x86_64.rpm http://kojipkgs.fedoraproject.org//packages/kernel/3.7.0/0.rc6.git1.1.fc19/x86_64/kernel-headers-3.7.0-0.rc6.git1.1.fc19.x86_64.rpm http://kojipkgs.fedoraproject.org//packages/kernel/3.7.0/0.rc6.git1.1.fc19/x86_64/kernel-modules-extra-3.7.0-0.rc6.git1.1.fc19.x86_64.rpm --nogpg