Skip to content

Instantly share code, notes, and snippets.

---
name: Helm
on:
push:
branches: [ production ]
paths-ignore:
- 'README.md'
- 'helm-charts/**/README.md'
- 'LICENSE'
@g3rhard
g3rhard / promtail_docker_logs.md
Created July 7, 2021 15:11 — forked from ruanbekker/promtail_docker_logs.md
Docker Container Logging using Promtail
name: deploy api
on:
push:
branches:
- master
release:
types: [created]
env:
@g3rhard
g3rhard / proxy.conf
Created May 21, 2021 10:49 — forked from sirsquidness/proxy.conf
How to have nginx proxy_pass follow upstream 302 redirects (eg, when you're running a steam cache and you're behind Cox's layer 7 interception stuff)
# This config came around after a friend had problems with a Steam cache on his
# Cox internet connection. Cox would intercept any requests to Steam content
# servers and return a 302 to Cox's servers. The cache would return the 302
# to the Steam client, and the Steam client would go directly to Cox, bypassing
# the cache.
# This config makes nginx follow the 302 itself, and caches the result of the
# redirect as if it was the response to the original request. So subsequent
# requests to the URL that returned a 302 will get the file instead of a 302.
@g3rhard
g3rhard / new_sysadmin_job_todo_check_list.md
Created February 22, 2021 10:45
New sysadmin job - preparing a to-do/check list

New sysadmin job - preparing a to-do/check list (credits: https://www.reddit.com/r/sysadmin/comments/5ioemb/new_sysadmin_job_preparing_a_todocheck_list/) I change my sysadmin job for two months (after 10 years working in current workplace). I prepared a list of things to accomplish in my new workplace based on multiple posts on r/sysadmin Each comment will be valuable.

Audit/check/Inventory/review:

  • Scope definition: Are you responsible for electricity, laptops, desktops, software support, mobile phones, server, online services the company uses, defining policies, etc
  • General documentation: do not impove until you understand the environment (do backup before change)
  • Crucial services inventory: Identify mission critical services and where they are hosted; identify who is responsible for them if its not you
  • [DR] Disaster Recovery Plan: Backups are running properly? Backup rotation? Last DR test? Automated? In case of my absence?
  • [BC] Business Continuity Plan
  • [BIA] Business Impact Analysis
  • Network
@g3rhard
g3rhard / script-template.sh
Created December 14, 2020 15:22 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
trap cleanup SIGINT SIGTERM ERR EXIT
usage() {
cat <<EOF
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@g3rhard
g3rhard / docker-compose.yml
Created August 8, 2020 10:23
Wireguard in Docker via docker-compose
---
version: "2.1"
services:
wireguard:
image: linuxserver/wireguard
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
@g3rhard
g3rhard / commit-msg
Created July 17, 2020 09:34 — forked from insoul/commit-msg
git commit hook for redmine
#!/usr/bin/env ruby
BASEDIR = ENV["HOME"] + "/.git_redmine"
require BASEDIR + "/git_redmine"
include GitRedmine::Hooks
exit commit_msg(ARGV[0])
@g3rhard
g3rhard / google-dorks
Created June 30, 2020 11:28 — forked from stevenswafford/google-dorks
Listing of a number of useful Google dorks.
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!