Skip to content

Instantly share code, notes, and snippets.

@mry
mry / unifi_deploy_patch.txt
Created July 10, 2024 11:34
Patch unifi.sh
--- /root/.acme.sh/deploy/unifi.bkp.sh 2024-07-10 13:29:01.699918327 +0200
+++ /root/.acme.sh/deploy/unifi.sh 2024-07-10 13:23:10.717345032 +0200
@@ -73,88 +73,6 @@
# Default reload commands accumulated as we auto-detect environments:
_reload_cmd=""
- # Unifi Controller environment (self hosted or any Cloud Key) --
- # auto-detect by file /usr/lib/unifi/data/keystore:
- _unifi_keystore="${DEPLOY_UNIFI_KEYSTORE:-/usr/lib/unifi/data/keystore}"
- if [ -f "$_unifi_keystore" ]; then
@mry
mry / unifi.sh
Created July 10, 2024 11:25
Temporary fix for ACME.sh deploy step for Unifi Cloud Gateway, which has faulty checks and not deploying "direct" certificates
#!/bin/bash
# Here is a script to deploy cert on a Unifi Controller or Cloud Key device.
# It supports:
# - self-hosted Unifi Controller
# - Unifi Cloud Key (Gen1/2/2+)
# - Unifi Cloud Key running UnifiOS (v2.0.0+, Gen2/2+ only)
# Please report bugs to https://github.com/acmesh-official/acme.sh/issues/3359
#returns 0 means success, otherwise error.
name ring quadrant isNew description
Composer adopt tools TRUE Although the idea of dependency management ...
Canary builds trial techniques FALSE Many projects have external code dependencies ...
Apache Kylin assess platforms TRUE Apache Kylin is an open source analytics solution ...
JSF hold languages & frameworks FALSE We continue to see teams run into trouble using JSF ...
Yet Another one adopt tools TRUE Yet another description...
And another one trial tools FALSE A public one...
@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

@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 / 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 / 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 / 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 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 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