Skip to content

Instantly share code, notes, and snippets.

View steinbrueckri's full-sized avatar
🤘

Richard Steinbrück steinbrueckri

🤘
View GitHub Profile
### Keybase proof
I hereby claim:
* I am steinbrueckri on github.
* I am steinbrueckri (https://keybase.io/steinbrueckri) on keybase.
* I have a public key ASDRwXrYXHx6jE9mfHqFm23wJ9li7FiuXCiobZuxA9IkyAo
To claim this, I am signing this object:
@steinbrueckri
steinbrueckri / zsh_to_fish.py
Created April 27, 2021 08:01 — forked from dvdbng/zsh_to_fish.py
Migrate zsh history to fish
import os
import re
def zsh_to_fish(cmd):
return (cmd.replace('&&', '; and ')
.replace('||', '; or '))
def is_valid_fish(cmd):

Disable Device Enrollment Program (DEP) notification on macOS Catalina.md

With full reinstall (recommended)

   a. Boot into recovery using command-R during reboot, wipe the harddrive using Disk Utility, and select reinstall macOS

   b. Initial installation will run for approximately 1 hour, and reboot once

   c. It will then show a remaining time of about 10-15 minutes

@steinbrueckri
steinbrueckri / osx_defaults.sh
Created August 10, 2020 10:10
OSX Defaults to setup a brand new machine
#!/usr/bin/env bash
# echo "Need to recapture iTerm settings"
# exit -1
# TODO: Need to figure out the settings for the following:
# 1) Finder: Left nav, favorite items with their order
# 2) Dock: Items with order
# 3) Security & Privacy Preferences: Full Disk Access, Camera, Microphone
# 4) Login items for my user (i.e. apps started when I login)

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
Favorites:
Unrefined:
(!(@home|@$WIFE|@mobile|@laptop|@errand|@office) & !##$EMPLOYER & !search:* & !##Someday/Maybe) |
(no priority & !search:* & !recurring & !##Someday/Maybe) |
(!search:: & !##Someday/Maybe & !recurring & !no priority) |
##Inbox,
(##Someday/Maybe|@not_now) & !no due date,
##Someday/Maybe & @next
@steinbrueckri
steinbrueckri / create-file-in-repo.sh
Last active April 25, 2022 21:30
Create file in GitHub Repo via API - Example
#!/bin/bash
MESSAGE="test"
TOKEN=$(cat ~/.github-token)
FILENAME="$RANDOM-date.txt"
CONTENT=$(date | base64)
USER="steinbrueckri"
REPO="api-test"
MESSAGE="hello world"
@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.

@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 / 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