Skip to content

Instantly share code, notes, and snippets.

View MikeGarde's full-sized avatar

Mike Garde MikeGarde

View GitHub Profile
@mapster
mapster / Readme.md
Last active December 30, 2023 06:29
Export Google Authenticator secret OTP-keys

Export Google Authenticator secret OTP-keys

I recently got myself a Yubikey and wanted to set up the Yubico Authenticator with all the OTPs I had in Google Authenticator. Unfortunately Yubico Authenticator doesn't support scanning the QR-code that the Google Authenticator generates when you export the OTP-keys, and it seemed like quite the daunting task to log in to every service to generate new OTP-keys. So I decided to have a look at the contents of the QR code, to see if I could import the keys into Yubico Authenticator in one go. Luckily I found a blog post by Alex Bakker that describes the data format.

Transfer QR-code to computer

Unfortunately, but likely for the best, the security policy of Google Authenticator won't allow you to take a screenshot of

@tamer-dahdul
tamer-dahdul / 01_httpd_phpfpm.config
Created July 4, 2020 20:45
Apache 2.4 / PHP-FPM 7.3 on Amazon Elastic Beanstalk
packages:
yum:
php73-fpm: []
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/26_phpfpm_config.sh":
mode: "000755"
owner: root
group: root
content: |

Getting Started With Superset: Airbnb’s data exploration platform

These instructions are for Amazon Linux Version 2

Update Python and PIP versions on EC2 (Amazon AMI)

sudo yum update -y
sudo yum install python3 -y
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 7, 2024 09:29
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@danmartens
danmartens / format_money.coffee
Created November 19, 2012 19:19
Format Money in Coffeescript
# Inspired by http://stackoverflow.com/a/149099/1649199
Number::formatMoney = (t=',', d='.', c='$') ->
n = this
s = if n < 0 then "-#{c}" else c
i = Math.abs(n).toFixed(2)
j = (if (j = i.length) > 3 then j % 3 else 0)
s += i.substr(0, j) + t if j
return s + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t)
@eligrey
eligrey / object-watch.js
Created April 30, 2010 01:38
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/