Skip to content

Instantly share code, notes, and snippets.

View eduardvercaemer's full-sized avatar
💭
working with simon

Ed eduardvercaemer

💭
working with simon
View GitHub Profile
@abatko
abatko / 2022-US-zip-codes-abatko.csv
Last active January 30, 2024 14:47
All US zip codes from 2022 Government Data, with geolocations (latitude and longitude coordinates), comma delimited. Source: https://www.census.gov/geographies/reference-files/time-series/geo/gazetteer-files.html > ZIP Code Tabulation Areas > Download the ZIP Code Tabulation Areas Gazetteer File. Based on https://gist.github.com/abatko/ee7b24db8…
We can't make this file beautiful and searchable because it's too large.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.457399, -67.124867
00606,18.158327, -66.932928
00610,18.293960, -67.127182
00611,18.276316, -66.807165
00612,18.416727, -66.700090
00616,18.420412, -66.671979
00617,18.446889, -66.561154
@eatnumber1
eatnumber1 / cookieauth.conf
Last active July 28, 2023 21:09
Stateless Nginx Cookie Authentication
# Simple Cookie Authorization (SCA)
#
# SCA sets up an auth scheme which uses a secure cookie, presenting basic
# auth if the cookie isn't supplied.
#
# Put this file in /etc/nginx/conf.d
#
# To use it, put a stanza like the following in a server section:
#
# set $sca_realm "My Website";
@kekru
kekru / 01nginx-tls-sni.md
Last active April 1, 2024 02:29
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled