Skip to content

Instantly share code, notes, and snippets.

@glw
glw / NDVI-calc.sh
Last active October 11, 2023 21:42
NDVI calculation
# gets read from a database, hardwired here
NDVI_COLORMAP="006600 008800 00BB00 00FF00 CCFF00 FFFF00 FFCC00 FF8800 FF0000 EE0000 DD0000 CC0000 BB0000 AA0000 990000 880000 770000"
NIR_INPUT=nir_input.tif
NIR_OUTPUT=nir_output.tif
RED_INPUT=red_input.tif
RED_OUTPUT=red_output.tif
NDVI_IMAGE=new_ndvi.tif
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active September 21, 2025 21:26 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@BretFisher
BretFisher / docker-swarm-ports.md
Last active August 12, 2024 16:10
Docker Swarm Port Requirements, both Swarm Mode 1.12+ and Swarm Classic, plus AWS Security Group Style Tables

Docker Swarm Mode Ports

Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
  • UDP port 4789 for "data plane" VXLAN overlay network traffic
  • IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option

AWS Security Group Example

@mtigas
mtigas / gist:952344
Last active September 5, 2025 07:28
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: