Skip to content

Instantly share code, notes, and snippets.

View fvoges's full-sized avatar
:octocat:

Federico Voges fvoges

:octocat:
View GitHub Profile
{
"interfaces": {
"ethernet": {
"eth0": {
"address": [
"10.0.0.1/29",
"10.0.0.2/29"
],
"firewall": {
"in": {
@fvoges
fvoges / vault_logrotate.conf
Last active May 4, 2022 19:31
logrotate configuration for HashiCorp Vault
# This file would normally be /etc/logrotate.d/vault.conf
# With these settings, your audit folder will like
# .
# ├── audit.2018-09-10.log.gz
# ├── audit.2018-09-11.log
# └── audit.log
# Change the path below to your own audit log path.
/var/log/vault/audit.log {
@fvoges
fvoges / backup_chrome_extensions_settings.sh
Created July 22, 2021 16:18
Backup Chrome extensions (including settings) - macOS only
#!/bin/bash
BACKUP_DIR="${HOME}/.chrome_extension_settings_backup"
DATE=$(date +%F)
BACKUP_FILE="${BACKUP_DIR}/extension_settings-${DATE}.tar.gz"
mkdir -p "${BACKUP_DIR}"
cd "${HOME}"
@fvoges
fvoges / scanner.sh
Created May 17, 2021 08:12 — forked from andyrbell/scanner.sh
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@fvoges
fvoges / script-template.sh
Created December 26, 2020 03:55 — 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
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...]
@fvoges
fvoges / tsm_make_group.rb
Last active December 14, 2020 19:03
Script to create a TSM (WoW addon) group from a wowhead.com URL
#!/usr/bin/env ruby
# Usage:
#
# Go to wowhead.com and create an item list, for example:
# https://www.wowhead.com/items/trade-goods?filter=87:166;11:1;0:0
#
# Once you're happy with the list, copy the URL from your browser
# and pass the URL as a parameter to this script.
#
# The script will, hopefully, extract the list of items, and then it
@fvoges
fvoges / binaries_download.sh
Last active November 3, 2023 11:33
Useful HashiCorp binaries scripts
#!/usr/bin/env bash -e
# Original source: https://gist.github.com/greenbrian/2e9e90d65c3d272c48b14dd3b3f19153
DEPS="curl jq unzip wget"
for cmd in $DEPS
do
if ! which -s $cmd
then
echo "$cmd command not found!"
echo "Ensure that you have the following tools installed and in your \$PATH: ${DEPS}"
@fvoges
fvoges / keybase.md
Created October 17, 2019 12:15
keybase.md

Keybase proof

I hereby claim:

  • I am fvoges on github.
  • I am boatsuk (https://keybase.io/boatsuk) on keybase.
  • I have a public key ASBUkaQqfKypWgZPPOp8ysQ1j2ZyaToOWGCqrOwsliuW7wo

To claim this, I am signing this object:

@fvoges
fvoges / gist:2f98a7350ce0b4fe229449343adbf5be
Last active April 25, 2019 16:19 — forked from kbarber/gist:6456420
Renewing a Puppet CA cert
Renew Puppet CA cert.
Not the perfect idea, but should alleviate the need to resign every cert.
What you need from existing puppet ssl directory:
ca/ca_crt.pem
ca/ca_key.pem
Create an openssl.cnf:
[ca]
@fvoges
fvoges / bitbucket.md
Created December 10, 2018 10:44
How to configure the webhook for Puppet Enterprise's Code Manager in BitBucket server

BitBucket

  1. Install BitBucket
  2. Make a Project called puppet (with a short name of PUP)
  3. Create a repository called control-repo
    • Create a user called r10k with a password of puppet.
    • Make the r10k user an admin of the PUP project.
  4. Either use the admin user to test pushing code, or create a user for yourself and add your SSH key to that user.
  • If making a user for yourself, give your user account read/write or admin privilege to the PUP project.