Skip to content

Instantly share code, notes, and snippets.

View BugRoger's full-sized avatar
😎
Dealing with it

Michael Schmidt BugRoger

😎
Dealing with it
  • SAP SE
  • Berlin
View GitHub Profile
@BugRoger
BugRoger / kubernetes.txt
Created January 27, 2017 19:04
Hillarious Transcript of a Kubernetes Talk
[00:00:12]
>> OK I don't know. I mean. I would actually like a LOOK LIKE WHAT. Like what. And there are. From A No We have got the very end. Yet. And we are not on the are you. One of them go down the ones who are down but are coming in to form or.
[00:03:05]
They are one of the machine. And the area around which Or like you know everything. For you and your area. For four or four and. On the run but no more and then it got all bent and the tried to blow them up. Or you can go where you are all in or out of the queue for the not responsible for actually part of the ordeal.
[00:04:51]
On the part of all of the primary shoppers who are actually on. The job and what do we have four four four four four in the box and the first part of figuring out where the problem is where the search such information that actually you know about their oil.
[00:06:06]
@BugRoger
BugRoger / kubectl_onliners.md
Last active June 29, 2016 09:50
Useful Kubectl Oneliners

Kubectl Oneliners

Check Node Ready State

kubectl get nodes -o json | jq -e '.items[] | select(.metadata.name=="master0") | (.status.conditions[] | select(.type=="Ready") | .status) == "True"'
@BugRoger
BugRoger / cadvisor_metrics.txt
Created April 19, 2016 08:27
cAdvisor Metrics
This file has been truncated, but you can view the full file.
# HELP cadvisor_version_info A metric with a constant '1' value labeled by kernel version, OS version, docker version, cadvisor version & cadvisor revision.
# TYPE cadvisor_version_info gauge
cadvisor_version_info{cadvisorRevision="",cadvisorVersion="",dockerVersion="1.9.1",kernelVersion="4.3.6-coreos",osVersion="CoreOS 899.15.0"} 1
# HELP container_cpu_system_seconds_total Cumulative system cpu time consumed in seconds.
# TYPE container_cpu_system_seconds_total counter
container_cpu_system_seconds_total{id="/"} 275478.31
container_cpu_system_seconds_total{id="/system.slice"} 238064.84
container_cpu_system_seconds_total{id="/system.slice/-.mount"} 0
container_cpu_system_seconds_total{id="/system.slice/audit-rules.service"} 0
container_cpu_system_seconds_total{id="/system.slice/boot.mount"} 0
@BugRoger
BugRoger / config.yaml
Created April 19, 2016 08:25
Prometheus Setup
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus
namespace: monitoring
data:
prometheus.yml: |
# A scrape configuration for running Prometheus on a Kubernetes cluster.
# This uses separate scrape configs for cluster components (i.e. API server, node)
@BugRoger
BugRoger / prometheus-config.yaml
Last active April 19, 2016 08:23
Prometheus Setup
We couldn’t find that file to show.
@BugRoger
BugRoger / lsblk.md
Created September 17, 2015 13:14
Test lsblk unformatted device detection

CoreOS 766.3.0 Stable

$ source /etc/os-release; echo $PRETTY_NAME
CoreOS 766.3.0+2015-09-16-1354
$ lsblk -nd -o FSTYPE /dev/foo
lsblk: /dev/foo: not a block device
$ lsblk -nd -o FSTYPE /dev/sdf

$ mkfs.ext4 /dev/sdf
$ lsblk -nd -o FSTYPE /dev/sdf
jobs:
- name: dashboard-build
serial: true
plan:
- get: dashboard.git
- do:
- task: a
privileged: true
config:
platform: linux
@BugRoger
BugRoger / batman.service
Created March 27, 2015 12:02
systemd Sidekick
[Unit]
Requires=robin.service
Before=robin.service
[Service]
ExecStart=/bin/bash -c '\
echo "batman start"; \
while true; do \
echo "batman alive"; \
sleep 1; \
@BugRoger
BugRoger / curl-ttfb.sh
Created March 24, 2015 14:31
curl-ttfb.sh
#!/bin/bash
while true; do
curl -so /dev/null -H "Pragma: no-cache" -H "Cache-Control: no-cache" \
-w "%{time_total}\t%{time_starttransfer}\t%{time_pretransfer}\t%{time_connect}\n" \
"$1?`date +%s`"
done

Keybase proof

I hereby claim:

  • I am bugroger on github.
  • I am michaelschmidt (https://keybase.io/michaelschmidt) on keybase.
  • I have a public key whose fingerprint is 7709 9F40 A0BB 8E4F CAD8 DA24 F46C A408 9726 1F33

To claim this, I am signing this object: