Skip to content

Instantly share code, notes, and snippets.

@mry
mry / AzureAutoSettings.cs
Created February 5, 2016 09:32 — forked from davidebbo/AzureAutoSettings.cs
AzureAutoSettings
using System;
using System.Collections;
using System.Configuration;
using System.Reflection;
using System.Web;
[assembly: PreApplicationStartMethod(typeof(EnvSettings.SettingsProcessor), "Start")]
namespace EnvSettings
{
@mry
mry / example.meta.js
Last active February 9, 2016 19:45
This is an example showing Gist capability and how to auto update
// ==UserScript==
// @name EXAMPLE SCRIPT
// @version 0.5
// @description This is an example showing Gist capability and how to auto update
// @author ballparts
// @include http://*.koalabeast.com*
// @include http://*.jukejuice.com*
// @include http://*.newcompte.fr*
// @grant none
// @updateURL https://gist.github.com/mry/94d0ab355b20a725a1f7/raw/example.meta.js
@mry
mry / clientchat.sh
Created July 12, 2016 18:27 — forked from redwallhp/clientchat.sh
Minecraft client chat log search
#!/usr/bin/env bash
# Minecraft folder
cd /Users/your_system_username/Library/Application\ Support/minecraft
function scan_logs {
@mry
mry / docker-compose.yml
Created June 5, 2017 16:56
LetsEncrypt Dockerized service for automatically maintaining certificates using nginx
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
logging:
driver: splunk
options:
splunk-url: https://10.0.1.29:8088
splunk-token: 43D65CB7-4AE8-4ABD-B402-C345781009D4
@mry
mry / docker-compose.yml
Created July 28, 2017 22:07
docker-compose file for Let's Encrypt on a Synology
version: '2'
services:
proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- '30080:80'
- '4343:443'
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
@mry
mry / docker-compose.yml
Created December 14, 2017 02:02
Docker Compose file for the latest stable candidate version of UniFi Controllers
version: '2'
services:
unifi-controller:
container_name: unifi-controller
restart: unless-stopped
image: goofball222/unifi:sc
ports:
- "3478:3478/udp"
- "8880:8880"
@mry
mry / docker-compose.yml
Created January 6, 2018 12:26
Sample Bookstack docker-compose.yml
version: '2'
services:
mysql:
container_name: bookstack-mysql
restart: unless-stopped
image: mysql:5.7.12
environment:
- MYSQL_ROOT_PASSWORD=YourRootPassw0rd!
- MYSQL_DATABASE=bookstack
@mry
mry / renew_ilo.sh
Created May 14, 2020 17:25 — forked from sebva/renew_ilo.sh
Renew/assign a Let's Encrypt certificate on an HP iLO 4 system
#!/bin/zsh
# Needs https://github.com/lukas2511/letsencrypt.sh in dns-01 mode
/opt/letsencrypt/ilo/letsencrypt.sh -c -s /opt/letsencrypt/ilo/ilo.csr -k /opt/letsencrypt/ilo/hook.sh -t dns-01 > /opt/letsencrypt/ilo/ilo.crt
cert=$(cat /opt/letsencrypt/ilo/ilo.crt)
curl --cacert /opt/letsencrypt/intermediate.pem -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic [FILL_IN_HERE]" -X POST -d "{\"Action\": \"ImportCertificate\", \"Certificate\": \"$cert\"}" https://ilo.home.vaucher.org/rest/v1/Managers/1/SecurityService/HttpsCert
@mry
mry / install_openvm_tools.sh
Created January 1, 2021 20:34
Make and install vmware open-tools on Ubuntu 20.04 arm64
#!/bin/sh
apt update -y && apt upgrade -y
apt install -y git automake make gobjc++ libtool pkg-config libmspack-dev libglib2.0-dev libpam0g-dev libssl-dev libxml2-dev libxmlsec1-dev libx11-dev libxext-dev libxinerama-dev libxi-dev libxrender-dev libxrandr-dev libxtst-dev libgdk-pixbuf2.0-dev libgtk-3-dev libgtkmm-3.0-dev
git clone https://github.com/vmware/open-vm-tools.git
cd open-vm-tools/open-vm-tools/
autoreconf -i
./configure --disable-dependency-tracking
make
make install
ldconfig
@mry
mry / AuthyToOtherAuthenticator.md
Created May 3, 2023 18:22 — 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