Skip to content

Instantly share code, notes, and snippets.

@g3rhard
g3rhard / .00-deploy.md
Last active July 26, 2024 17:07
minimal dotfiles
  • Install spaceship theme
git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
sed -i 's/^ZSH_THEME=".*"/ZSH_THEME="spaceship"/' ~/.zshrc
{
"createdBy": "Redirector v3.5.3",
"createdAt": "2023-12-11T08:55:48.601Z",
"redirects": [
{
"description": "Youtube",
"exampleUrl": "https://www.youtube.com/watch?v=iv8Ci8omkks",
"exampleResult": "https://invidious.g3rhard.cc/watch?v=iv8Ci8omkks",
"error": null,
"includePattern": "www.youtube.com/(watch.*)",
@g3rhard
g3rhard / AuthyToOtherAuthenticator.md
Created August 8, 2023 19:48 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the

@g3rhard
g3rhard / bash-skel.sh
Created May 3, 2023 07:49 — forked from wardenlym/bash-skel.sh
Minimal safe Bash script template
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
#!/usr/bin/perl -w
#
# Script to convert ClearCase historical information to Subversion.
#
# See pod documentation on the bottom of the script for details.
#
# Version 1.0.2
#
# Revision history
#==================================================
#!/bin/bash
# https://github.com/ansible/ansible/issues/12686#issuecomment-268535162
cmd=''
for i in "$@"; do
i="${i//\\/\\\\}"
cmd="$cmd \"${i//\"/\\\"}\""
done
sudo su - root << END
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: