Skip to content

Instantly share code, notes, and snippets.

@bnhf
bnhf / README.md
Last active July 2, 2025 17:47
Tailscale - Deploying with Docker and Portainer

Just thought I'd put together some detail on deploying Tailscale using Docker and Portainer. These bits-and-pieces are available elsewhere, but not together, so hopefully this will save someone a bit of time if you'd like to add Tailscale to an existing Docker install:

Here's my annotated recommended docker-compose, to use with Portainer-Stacks. Note that I'm not using a pre-made Auth Key. I started that way, but realized it was very easy to simply check the Portainer log for the tailscaled container once the stack is running. In that log you'll see the standard Auth link that you can use to authorize the container. This way you don't need to create a key in advance, or create a reusable key that introduces a security risk:

version: '3.9'
services:
  tailscale:
    image: tailscale/tailscale
    container_name: tailscaled
#Requires AutoHotkey v2.0
AppVol(Target := "A", Level := 0) {
if (Target ~= "^[-+]?\d+$") {
Level := Target
Target := "A"
} else if (SubStr(Target, -4) = ".exe") {
Target := "ahk_exe " Target
}
try {
@jesboat
jesboat / resign-chrome-secure-prefs.py
Created August 14, 2019 02:12
python script to fix signatures in a chrome profile after moving it to a new computer (macOS)
#!/usr/bin/env python3
import argparse
import functools
import hmac
import json
import plistlib
import subprocess
@QuantBits
QuantBits / script.js
Created February 8, 2019 17:55
BitMex USD Converter - For TemperMonkey
// ==UserScript==
// @name BitMex USD Converter
// @namespace https://bitmex.com/
// @version 0.11
// @description Get some sanity into your gambling.
// @author koinkraft
// @grant none
// @include https://bitmex.com/*
// @include https://www.bitmex.com/*
// @require https://code.jquery.com/jquery-2.1.4.min.js
@netravnen
netravnen / move-browser-cache-to-ramdisk.bat
Last active October 21, 2019 22:33
Move Firefox/Chrome/Opera cache folder a ramdisk location (R:)
:: TITLE: move-browser-cache-to-ramdisk.bat
:: BY: GH:netravnen
:: NOTE: Requires administrator rights to run under Windows
:: VERSION: v1.0.0-20180728
:: Google Chrome
IF EXIST "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Cache" (
rmdir /S /Q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Cache"
mklink /D "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Cache" R:\cache
ECHO Google Chrome cache moved
@lostmsu
lostmsu / LifeSpan.cs
Last active April 12, 2025 01:14
Control LifeSpan treadmill from C# (treadmill drops connection if not kept alive)
// License: MIT
using System;
using System.Collections.Concurrent;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
public class LifeSpanTreadmill: IDisposable
{
@geertj
geertj / txlog.py
Last active May 15, 2021 03:36
Ethereum tax calculator
#!/usr/bin/env python
#
# Store Ethereum transactions to a certain address in a CSV file, with
# associated pricing data. Can be used to understand mining revenue.
import sys
import csv
import time
import json
import bisect