Skip to content

Instantly share code, notes, and snippets.

View theckman's full-sized avatar

Tim Heckman theckman

  • Los Angeles, CA
View GitHub Profile
@peterhellberg
peterhellberg / minimal-htmx-todo.go
Last active December 28, 2023 18:48
A single Go file HTMX Todo list example, using no third party Go dependencies.
package main
import (
"context"
"crypto/rand"
"encoding/hex"
"fmt"
"html/template"
"net/http"
"os"
@nealfennimore
nealfennimore / wireguard.conf
Last active July 21, 2024 13:38
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
From -> https://forum.synology.com/enu/viewtopic.php?t=98124
1. Go to your console ( https://console.developers.google.com/ ) and create a project.
2. Create a bucket in Storage -> Cloud Storage -> Storage Browser
3. Go to Storage -> Cloud Storage -> Storage Access and enable Interoperability
4. Generate access key
5. Now go to DSM 5.2 and install Hyper Backup if you havent already.
6. Pick S3 storage
7. The input next to the label "S3 Server" is both text input and drop-down. This is where you write "storage.googleapis.com"
8. Enter key and secret.
@Arachnid
Arachnid / genwordlist.py
Last active June 19, 2017 12:22
An attempt at a better mnemonic wordlist. All words are 4-8 characters; all 4-character prefixes are unique, and no two words have edit distance < 2.
from pyxdameraulevenshtein import damerau_levenshtein_distance
words = [line.strip().split(" ")[1] for line in open('wordlist.txt')]
out = []
for word in words:
if len(out) >= 2148: break
if len(word) < 4 or len(word) > 8: continue
if len(out) > 0 and min(damerau_levenshtein_distance(x, word) for x in out) < 2: continue
if any(x.startswith(word[:4]) for x in out): continue
print word
out.append(word)
@steventroughtonsmith
steventroughtonsmith / gist:6788b6c340a0aa52345a
Created October 27, 2015 05:19
Run OS X Screen Saver as Wallpaper
/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background
@haasn
haasn / about:config.md
Last active April 2, 2024 18:46
Firefox bullshit removal via about:config

Firefox bullshit removal

Updated: Just use qutebrowser (and disable javascript). The web is done for.

@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@kachayev
kachayev / concurrency-in-go.md
Last active May 31, 2024 09:34
Channels Are Not Enough or Why Pipelining Is Not That Easy
@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@jbenet
jbenet / simple-git-branching-model.md
Last active June 17, 2024 14:53
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.