Skip to content

Instantly share code, notes, and snippets.

View chrismazanec's full-sized avatar

Chris Mazanec chrismazanec

View GitHub Profile
@chrismazanec
chrismazanec / ib_migration.md
Created November 23, 2022 10:18 — forked from junajan/ib_migration.md
IBCE to IBIE Migration guide

Dear Mr. ..., Thank you for contacting Interactive Brokers Customer Service. If you would like to have an account with IBIE rather than an IBCE account, you can initiate a new account opening on our website. When you initiate the opening process, please specify a Western European country (e.g. Germany) as legal residence so the application can trigger IBIE as the governing entity of your account. Once you proceed further with the application and reach the tax details part, please contact us via ticket so we can change the account details manually and finish up the setup. Once your new account is opened, you can request a full manual transfer from your current account in the following way:

  1. Log into Client Portal
  2. Click to the User menu (head and shoulders icon) in the top right corner, followed by Secure Message Center
  3. Click to Compose, then click to create new to submit a new web ticket
  4. Select Funds & Banking as the category and Other Deposits and Withdrawals as the topic
@chrismazanec
chrismazanec / tf-apply.sh
Created October 11, 2022 23:42 — forked from dex4er/tf-apply.sh
Terraform less verbose and more bash friendly
#!/bin/bash
trap 'rm -rf terraform.tfplan' EXIT
trap '' INT
function filter_manifest_short() {
grep --line-buffered -v -P '\(known after apply\)|\(\d+ unchanged \w+ hidden\)'
}
function filter_manifest_compact() {
@chrismazanec
chrismazanec / alacritty-tmux-vim_truecolor.md
Created August 26, 2022 10:40 — forked from andersevenrud/alacritty-tmux-vim_truecolor.md
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
substitutions:
device_name: esphallway
device_comment: Main Thermostat
esphome:
name: ${device_name}
comment: ${device_comment}
on_boot:
priority: -100
then:
@chrismazanec
chrismazanec / ESPHome-Vindriktning.yaml
Created June 21, 2022 16:24
IKEA Vindriktning SW for ESPHome
# https://www.laskakit.cz/laskakit-esp-vindriktning-esp-32-i2c/
# https://github.com/LaskaKit/ESP-Vindriktning
# https://gist.github.com/bruxy70/e668e00e94b34bf699488fe1d8de379a
substitutions:
device_name: espairquality1
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
api_password: !secret api_password
ota_password: !secret ota_password
# using awk only instead of "| grep string1 | grep string2 | awk '{print $3' | head -n1"
cat << EOF | awk '/string1/ && /string2/ {print $3; exit}'
string1 string2 row1col3
string1 string2 row2col3
string1 string3 row3col3
EOF
@chrismazanec
chrismazanec / load-yubikey-totp.sh
Last active February 23, 2021 16:37
loads TOTP keys from standard input into all plugged yubikeys; quickly restore TOTP from backup to YubiKeys
#!/usr/bin/env bash
# loads TOTP keys from standard input into all plugged yubikeys
# used to quickly restore TOTP from backup to YubiKeys
#
# sample input:
# chris_google;TOTPSecRetKey
# chris_facebook;TOTPSecRetKey2
# CTRL+D
cat << EOF
@chrismazanec
chrismazanec / aws-yubikey-mfa.sh
Last active February 1, 2021 08:06
YubiKey AWS MFA helper - get MFA code of corresponding AWS profile from YubiKey and copy it to MacOS clipboard
#!/usr/bin/env bash
# description:
# search `~/.aws/config` for profile passed in argument and if found, get
# a corresponding MFA code from YubiKey and store it in MacOS clipboard
# yubikey `ykman` howto:
# ykman oath add -t arn:aws:iam::<account-number>:mfa/root-account-mfa-device
# ykman oath add -t arn:aws:iam::<account-number>:mfa/<iam-user>
# ykman oath code -s arn:aws:iam::<account-number>:mfa/<iam-user>

Keybase proof

I hereby claim:

  • I am chrismazanec on github.
  • I am chrismazanec (https://keybase.io/chrismazanec) on keybase.
  • I have a public key ASDL88-8ebJRjwFhHIciWpIajNjkxNTUxH7Vv6A9khVjvQo

To claim this, I am signing this object:

@chrismazanec
chrismazanec / aws-rds-snapshots-size.sh
Created January 16, 2021 12:56
count total allocated storage for AWS RDS DB snapshots
aws rds describe-db-snapshots --region=us-east-1 | \
jq '.DBSnapshots | .[] | .AllocatedStorage' | \
awk '{s+=$1}END{print s}'