Skip to content

Instantly share code, notes, and snippets.

View magicstone1412's full-sized avatar

magicstone1412 magicstone1412

View GitHub Profile
@magicstone1412
magicstone1412 / README.md
Created December 28, 2025 00:45 — forked from bnhf/README.md
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
@magicstone1412
magicstone1412 / Canvas2HTML
Created November 2, 2025 13:27
Exporting Canvas to HTML and PDF in Obsidian
// Get a copy of the canvas content element
let view = app.workspace.activeLeaf.view;
if (view.getViewType() !== "canvas") {
throw new Error("The active view is not a canvas");
}
let content = view.contentEl.cloneNode(true);
// Remove the canvas background dots
content.querySelector(".canvas-background").remove();
@magicstone1412
magicstone1412 / ethereum-sepolia.yml
Last active November 14, 2025 09:12
Run your own RPC and Beacon
services:
reth:
image: ghcr.io/paradigmxyz/reth:v1.8.2
container_name: reth
restart: unless-stopped
command:
- node
- --chain
- sepolia
- --full
@magicstone1412
magicstone1412 / script
Created July 16, 2025 23:24
Mikrotik - Automatically add Roblox IP from DNS Cache to Address List
:foreach dnscache in=[/ip dns cache find] do={
:local dnscacheVal [/ip dns cache get $dnscache]
:local name ($dnscacheVal->"name")
:local data ($dnscacheVal->"data")
:local type ($dnscacheVal->"type")
# Only process if name contains "roblox"
:if ($name ~ "roblox") do={
[Unit]
Description=Aztec Node Service
After=network.target
Wants=network.target
[Service]
Type=simple
ExecStart=/root/.aztec/bin/aztec start --node --archiver --sequencer \
--network alpha-testnet \
--l1-rpc-urls your_rpc_url \
@magicstone1412
magicstone1412 / borg_backup.sh
Created December 12, 2024 23:03
Borg Backup Script
#!/bin/bash
# Exit immediately if a command exits with a non-zero status
set -e
# Variables (Customize these)
BACKUP_REPO="/path/to/backup/repo" # Borg repository location
BACKUP_SOURCE="/path/to/backup/source" # Directory to back up
PASSPHRASE="your-borg-passphrase" # Borg passphrase (avoid exposing in scripts; use environment variables instead)
BACKUP_LOG="/var/log/borg_backup.log" # Log file location
@magicstone1412
magicstone1412 / rclone-mount-yandex
Created November 18, 2024 14:44
Mount Yandex disk using rclone docker compose
---
services:
rclone-mount:
image: rclone/rclone:latest
container_name: rclone-mount
restart: unless-stopped
environment:
- RCLONE_CONFIG=/config/.rclone.conf
- PUID=1001
- PGID=100
@magicstone1412
magicstone1412 / qbittorrent
Created November 17, 2024 10:00
OVM qbittorrent docker compose file
---
services:
---
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
environment:
- PUID=1001
- PGID=100
- TZ=${TZ}
@magicstone1412
magicstone1412 / Dockerfile
Created October 27, 2024 01:38
Tor proxy using Docker
# Set the latest version of Alpine Linux as the base image
FROM alpine:latest
# Updates the package list in the Alpine package manager and installs the Tor package.
RUN apk update && apk add tor
# Instructs Tor to send log notices to the standard output
RUN echo "Log notice stdout" >> /etc/torrc
# Configures Tor to listen for SOCKS connections on all network interfaces (0.0.0.0) on port 9050
@magicstone1412
magicstone1412 / cloudflare-tunnel.yml
Created October 20, 2024 00:20
Cloudflare Zero Trust Tunnel docker-compose file for Openmediavault
---
services:
# cloudflare tunnel
cloudflare-tunnel:
image: cloudflare/cloudflared
container_name: cloudflare-tunnel
restart: unless-stopped
command: tunnel run
environment:
- "TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN}" #Add varible to environment file