Skip to content

Instantly share code, notes, and snippets.

View goetzc's full-sized avatar
🕉️

Götz goetzc

🕉️
View GitHub Profile
@goetzc
goetzc / AuthyToOtherAuthenticator.md
Created April 6, 2023 13:38 — 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

@goetzc
goetzc / 99-noto-mono-color-emoji.conf
Created December 14, 2021 00:15 — forked from IgnoredAmbience/99-noto-mono-color-emoji.conf
Noto Emoji Color fontconfig for Konsole
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Noto Mono + Color Emoji Font Configuration.
Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole.
Usage:
0. Ensure that the Noto fonts are installed on your machine.
1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf
@goetzc
goetzc / bash.generate.random.alphanumeric.string.sh
Created September 2, 2021 15:54 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@goetzc
goetzc / fix_codium.py
Last active April 17, 2021 17:26 — forked from rojnwa/fix_codium.py
Reverts to the old marketplace in VSCodium
#!/usr/bin/env python
import json
PRODUCT_PATH = "/usr/lib/code/product.json"
official_gallery = {
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
"itemUrl": "https://marketplace.visualstudio.com/items",

Keybase proof

I hereby claim:

  • I am goetzc on github.
  • I am goetzc (https://keybase.io/goetzc) on keybase.
  • I have a public key ASDPyx0QteogNQJAh9fAR00IGKfjdKN78IDdTw-aYUO-WAo

To claim this, I am signing this object:

@goetzc
goetzc / Scaling (Rails) Cron jobs
Last active November 14, 2020 00:30 — forked from wonjun27/Scaling Cronjobs
Rails Cron jobs
Scalr
http://highscalability.com/blog/2010/3/22/7-secrets-to-successfully-scaling-with-scalr-on-amazon-by-se.html
http://stackoverflow.com/questions/10061843/how-to-convert-linux-cron-jobs-to-the-amazon-way
Cron Jobs Are Hard To Distribute
Watch out when scaling out instances with cron jobs on them. Cron jobs aren't designed for the cloud. If the machine image holding your cron job scales out to 20 instances, your cron job will be executed 20 times more often.
This is fine if the scope of your cron job is limited to the instance itself, but if the scope is larger, the above becomes a serious problem. And if you single out a machine to run those cron jobs, you run the risk of not having it executed if that machine goes down.
@goetzc
goetzc / Vagrantfile
Created January 6, 2019 19:03 — forked from wosc/Vagrantfile
Build unison-2.51.2 deb, compatible with the MacOS binary release
Vagrant.configure("2") do |config|
config.vm.define "default" do |default|
default.vm.hostname = "unisonbuild"
default.vm.provider "lxc"
default.vm.box = "zeitonline/bionic64-lxc"
# default.vm.box = "bento/ubuntu-18.04"
end
end

Basics

generate key in batch mode using a custom profile

gpg --gen-key --batch gpgspecs

create a file with your fingerprint info and display the related information. A fingerprint is used as a robust key identifier

gpg --fingerprint

Best practices

@goetzc
goetzc / CloudwatchMonitoringScripts.json
Last active January 17, 2019 17:49
AWS IAM policy for CloudWatch monitoring scripts
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"cloudwatch:PutMetricData",
"cloudwatch:GetMetricStatistics",
"cloudwatch:ListMetrics",
"ec2:DescribeTags"
@goetzc
goetzc / btrfs-subvolume-diff.sh
Created December 30, 2017 23:02
Show the difference between two btrfs subvolumes/snapshots
#!/bin/bash
#
# Author: http://serverfault.com/users/96883/artfulrobot
#
# This script will show most files that got modified or added.
# Renames and deletions will not be shown.
# Read limitations on:
# http://serverfault.com/questions/399894/does-btrfs-have-an-efficient-way-to-compare-snapshots
#
# btrfs send is the best way to do this long term, but as of kernel