Skip to content

Instantly share code, notes, and snippets.

set vlcPath="C:\vlc.exe"
%vlcPath% %1 --video-x=1980 --video-y=400 --width=300 --height=300 --fullscreen ^
--no-video-title-show --no-embedded-video --no-qt-fs-controller
bash#!/bin/bash
# avoidng collisions with other rsync processes
#the minutes passed to the script 21h*60min = 1260 Minuten
minutes=1260
# Make sure no one else is using rsync
pro_on=$(ps aux | grep -c rsync)
@g3rhard
g3rhard / Cloud Security Orienteering Checklist.md
Created September 23, 2021 11:57 — forked from ramimac/Cloud Security Orienteering Checklist.md
A Checklist of Cloud Security Orienteering

Cloud Security Orienteering: Checklist
by Rami McCarthy
via TL;DR sec

How to orienteer in a cloud environment, dig in to identify the risks that matter, and put together actionable plans that address short, medium, and long term goals.

Based on the Cloud Security Orienteering methodology.

Checklist

@g3rhard
g3rhard / trigger-webhook.yml
Created August 2, 2021 16:38
Example webhook trigger for Jenkins
name: Component Triggering
on:
issue_comment:
types:
- created
jobs:
trigger-webhook:
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request }}
steps:
---
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