Skip to content

Instantly share code, notes, and snippets.

Create Site2Site VPN

  • Create Ubuntu 22.04 Cloud Server (WAN) -- You can use Digital Ocean, Linode, whatever
  • Create Ubuntu 22.04 Internal Server (LAN)
---Replace the following where necessary---
<WAN_PUBLIC_IP>
<WAN_PRIVATE_KEY>
<WAN_PUBLIC_KEY>
@jes
jes / protoproxy.go
Last active September 23, 2022 11:53
Run SSH and HTTP on the same port
package main
import (
"fmt"
"net"
"os"
"strings"
)
func main() {
@dbehnke
dbehnke / luksloopback.sh
Created December 30, 2014 20:25
luks encryption with loopback file
#!/bin/bash
loopdevice=/dev/loop0
loopfile=crypt.loop
#megabytes
loopsize=256
#/dev/mapper/xxxxx when open
cryptmapper=myCrypt
@willurd
willurd / web-servers.md
Last active May 7, 2024 14:57
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000