Skip to content

Instantly share code, notes, and snippets.

View steinbrueckri's full-sized avatar
🤘

Richard Steinbrück steinbrueckri

🤘
View GitHub Profile
@steinbrueckri
steinbrueckri / image_via_ssh
Last active December 17, 2018 13:39
Transferring a Docker image via SSH
# docker save | streamed images to STDOUT
# bzip2 | compress image an the fly
# pv | show progress bar
# ssh | forward stream to remote host
# bunzip2 | decompress on remote host
# docker load | reimport on remote host
docker save <image> | bzip2 | pv | ssh user@host 'bunzip2 | docker load'
@steinbrueckri
steinbrueckri / RUNBOOK.md
Last active June 16, 2019 18:58 — forked from voxxit/RUNBOOK.md
Example of a solid run book/operations manual

Run Book / Operations Manual

System Overview

Service Overview

Contributing Applications, Daemons, and Windows Services

Hours of Operation

@steinbrueckri
steinbrueckri / OpsReadiness.md
Created June 19, 2019 14:17 — forked from adyrcz/OpsReadiness.md
Operational Readiness Checklist

Operational Readiness Checklist

Types of Operability Requirements

  • Project Requirements
  • Configuration Management
  • CI/CD
  • Service Level Managment Requirements
  • Monitoring
@steinbrueckri
steinbrueckri / example.tf
Last active August 13, 2019 18:38
Deploy 🚀 SSH 🔑 via Terraform #terraform #ssh #deploy
# ssh key via variable
resource "google_compute_instance" "via-variable" {
name = "via-variable"
machine_type = "n1-standard-1"
zone = "europe-west4-a"
boot_disk {
initialize_params {
image = "debian-cloud/debian-9"
}

Team Boards

the moment a card is due, post comment "@{creatorusername} {triggercardname} is overdue!", add the warning sticker

when a comment containing "Done ✅" is posted to a card, move it to the top of the list "Done"

when a card in list "Done ✅" is archived, post comment "Card archived on {date} by {username}"

when a card is moved to the "Done ✅" list, remove all the labels and due date from it and unsubscribe the member from the card
@steinbrueckri
steinbrueckri / trello2github.sh
Created March 9, 2020 21:01
Dirty Trello2Github issues migration script
#!/bin/bash
### Open your Trello Board in the Brower for example https://trello.com/b/UyF8VyFV/innovation-weekly
### Add ".json" add the end of the URL like https://trello.com/b/UyF8VyFV/innovation-weekly.json
### Now your browser should display a Json Doc, download this.
for row in $(cat innovation-weekly.json | jq -r '.cards[] | { status: .closed, name: .name, desc: .desc} | @base64'); do
_jq() {
echo ${row} | base64 --decode | jq -r ${1} | tr -d '\n'
}
const isDev = ['localhost', '127.0.0.1'].includes(location.hostname);
const dom = {
select: document.querySelector.bind(document),
slectAll: document.querySelectorAll.bind(document)
};
const injectScript = (source, callback) => {
const script = document.createElement('script');
script.src = source;
script.addEventListener('load', callback);
document.head.appendChild(script);
@steinbrueckri
steinbrueckri / check_image_tag.sh
Created April 14, 2020 19:38
check_image_tag
#!/bin/bash
# NOTE: other solution can maybe ...
# gcloud container images list-tags eu.gcr.io/project_id/image_name
image=$1
if [[ ! $image =~ ^[eu\.]*gcr\.io\/.+\/.+:.+$ ]]; then
echo "[ERROR] bad parameter, expect something like 'eu.gcr.io/project/image:version'"
exit 255
fi
@steinbrueckri
steinbrueckri / Projects to which I have contributed ...
Last active April 26, 2020 13:38
Projects to which I have contributed ...
octokit/octokit.rb, mlabouardy/komiser, googleapis/google-cloud-ruby, gildasio/h2t,
cflint/CFLint, Comcast/snowdrift, pajowu/fahrgastrechte-autofill, mathieudutour/github-tag-action,
ocadaruma/zsh-gcloud-prompt, burdzwastaken/hadolint-action, s4u/maven-settings-action, p1nkun1c0rns/awesomeness,
karancode/yamllint-github-action, actionshub/markdownlint, progettoIspw2019/FixMyCity, chick-p/action-markdownlint,
mrlesmithjr/ansible-sshd, p1nkun1c0rns/deploy-google-cloud-run-action, p1nkun1c0rns/prometheus-operator-lint-action, p1nkun1c0rns/maven-settings-action,
p1nkun1c0rns/sonarcloud-test-java, p1nkun1c0rns/gha-test-repo, grulkeS/IronHackArena, gleichda/cloud-shell,
FrauTroll/JuniorChallenge, dabeck/envsubst, rsrchboy/docker-mdl,
@steinbrueckri
steinbrueckri / postmortems.md
Created May 18, 2020 17:52 — forked from spaceninja/postmortems.md
Postmortem Doc from Cloud Four

Incident Postmortems

Postmortem documents are a ritual designed to examine serious incidents or outages. Google’s book on Site Reliability Engineering says:

A postmortem is a written record of an incident, its impact, the actions taken to mitigate or resolve it, the root cause(s), and the follow-up actions to prevent the incident from recurring.

Purpose

We practice postmortems to ensure we understand and address the root cause of severe incidents such as outages, data loss, or serious production bugs.