Skip to content

Instantly share code, notes, and snippets.

View Elte156's full-sized avatar

Tony Pagaduan Elte156

View GitHub Profile
@ramboldio
ramboldio / runCertbot.sh
Last active September 9, 2021 16:16
Run Certbot in Docker
#!/bin/bash
# this folder needs to exist
mkdir ~/certs
# authenticate yourself (requires that nothing runs on ports 443 and 80)
docker run --rm -it -v ~/certs:/etc/letsencrypt -p 443:443 certbot/certbot certonly --authenticator standalone
# renewal
docker run --rm -it -v ~/certs:/etc/letsencrypt certbot/certbot renew
@brandonmwest
brandonmwest / example.cs
Last active January 16, 2024 15:52
Generating base64-encoded Authorization headers in a variety of languages
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue(
"Basic",
Convert.ToBase64String(
System.Text.ASCIIEncoding.ASCII.GetBytes(
string.Format("{0}:{1}", username, password))));