Skip to content

Instantly share code, notes, and snippets.

View lsl's full-sized avatar

Louis Laugesen lsl

  • Automattic
  • Australia
  • 03:38 (UTC +10:00)
View GitHub Profile
@lsl
lsl / README.md
Created July 22, 2023 14:58 — forked from bwann/README.md
Tunnelling SSH over SSL/TLS

How to tunnel SSH over SSL/TLS

laptop ssh -> laptop stunnel -> evil network -> internet -> your server -> your server ssh

Server (your shell server/home box/work box/whatever)

Sets up a stunnel process listening externally on port 2443/tcp, forwards to localhost 22/tcp

  • Install stunnel, e.g. yum install stunnel
  • Install server config snippet to /etc/stunnel/stunnel.conf
all: alfa.pdf
alfa.pdf: alfa.latex
latexmk -pdf $<
alfa.png: alfa.pdf
convert -density 150 -flatten $< $@
clean: alfa.latex
latexmk -CA $<
@lsl
lsl / invalid-zips.json
Created March 12, 2019 06:02
JSON list of valid and invalid US ZIP codes
["00000", "00001", "00002", "00003", "00004", "00005", "00006", "00007", "00008", "00009", "00010", "00011", "00012", "00013", "00014", "00015", "00016", "00017", "00018", "00019", "00020", "00021", "00022", "00023", "00024", "00025", "00026", "00027", "00028", "00029", "00030", "00031", "00032", "00033", "00034", "00035", "00036", "00037", "00038", "00039", "00040", "00041", "00042", "00043", "00044", "00045", "00046", "00047", "00048", "00049", "00050", "00051", "00052", "00053", "00054", "00055", "00056", "00057", "00058", "00059", "00060", "00061", "00062", "00063", "00064", "00065", "00066", "00067", "00068", "00069", "00070", "00071", "00072", "00073", "00074", "00075", "00076", "00077", "00078", "00079", "00080", "00081", "00082", "00083", "00084", "00085", "00086", "00087", "00088", "00089", "00090", "00091", "00092", "00093", "00094", "00095", "00096", "00097", "00098", "00099", "00100", "00101", "00102", "00103", "00104", "00105", "00106", "00107", "00108", "00109", "00110", "00111", "00112", "00113
@lsl
lsl / unison-prune-tmp.sh
Last active January 31, 2019 10:24 — forked from delputnam/gist:8213bbe304b9ffbdcfc28f5d6b083e8c
Delete unison.tmp files
# Note unison should be deleting tmp files older than 30 days automatically anyway
find . -name '*.unison.tmp' -delete
@lsl
lsl / README.md
Created March 18, 2018 10:30
Local DNS cache with pdnsd. Uses DHCP configured DNS with fallback on Google DNS
  1. Installation

    $ sudo pacman -Sy
    $ sudo pacman -S pdnsd
  2. Configure pdnsd

    $ sudo vi /etc/resolvconf.conf

$ sudo vi /etc/pdnsd.conf

@lsl
lsl / docker-compose.yml
Last active January 28, 2018 18:16
Simple private docker registry setup for running on remote hosts (docker-compose, ssl, letsencrypt, basic auth)
# Simple registry setup
#
# Replace mydomain.com with your domain and ensure
# registry.mydomain.com points at your server.
#
# https://docs.docker.com/registry/configuration/
#
# Create your basic auth password file:
#
# % htpasswd -c -B htpasswd USERNAME
### Keybase proof
I hereby claim:
* I am lsl on github.
* I am lsl (https://keybase.io/lsl) on keybase.
* I have a public key whose fingerprint is 8E9F E211 4F2C F921 6C5E A96D 6067 8BED 50CC CD46
To claim this, I am signing this object:
@lsl
lsl / Steps to take
Last active December 12, 2015 01:19 — forked from gerritwessels/Steps to take
Thanks to:
http://realityloop.com/blog/2012/07/03/nginx-mariadb-php-aegir-mac-os-x-optional-drush-5-works-mountain-lion
and
http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion
--Fresh install Mountain Lion.
--Install XCode 4.6
--Install Command line utilities via Xcode
--Install Homebrew