Skip to content

Instantly share code, notes, and snippets.

View mdprotacio's full-sized avatar
:octocat:

Melvin D. Protacio mdprotacio

:octocat:
View GitHub Profile
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 6, 2024 07:25
set -e, -u, -o, -x pipefail explanation
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active March 16, 2024 13:18
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@jprjr
jprjr / Server-level CORS in NGINX.md
Last active June 11, 2020 16:15
Server-level CORS in NGINX

NGINX does weird things with If statements: http://wiki.nginx.org/IfIsEvil

It turns out, "if" inside a location directive w/ proxy_pass disables that implied URL-rewriting function. So, for example:

location /some/url/ {
  proxy_pass http://backend/api/;
  # example client url: http://server/some/url/data
  # URL sent to proxy: http://backend/api/data
}