Skip to content

Instantly share code, notes, and snippets.

Avatar

joshxyzhimself joshxyzhimself

View GitHub Profile
@joshxyzhimself
joshxyzhimself / haproxy_letsencrypt.md
Created March 4, 2023 00:31 — forked from lmmendes/haproxy_letsencrypt.md
# HAProxy and Let's Encrypt
View haproxy_letsencrypt.md

HAProxy and Let's Encrypt

HAProxy is a open-source TCP/HTTP load-balancing proxy server supporting native SSL, keep-alive, compression CLI, and other modern features.

Let’s Encrypt is a free, automated, and open certificate authority (CA), run for the public’s benefit. Let’s Encrypt is a service provided by the Internet Security Research Group (ISRG).

Concept

View _MicroService Proxy Gateway Solutions.md

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@joshxyzhimself
joshxyzhimself / audit.sql
Created September 18, 2022 11:29
supabase audit.sql
View audit.sql
-- References
--
-- https://www.pgaudit.org/
-- https://github.com/pgaudit/pgaudit
--
-- https://supabase.com/blog/audit
-- https://github.com/supabase/supa_audit
-- https://news.ycombinator.com/item?id=30615470
--
-- https://github.com/2ndQuadrant/audit-trigger
@joshxyzhimself
joshxyzhimself / rbac_defaults.sql
Last active September 1, 2022 04:47
Postgresql RBAC
View rbac_defaults.sql
DROP TYPE IF EXISTS "role" CASCADE;
DROP TYPE IF EXISTS "scope" CASCADE;
DROP TYPE IF EXISTS "action" CASCADE;
DROP TABLE IF EXISTS "roles" CASCADE;
DROP TABLE IF EXISTS "permissions" CASCADE;
DROP TABLE IF EXISTS "user_roles" CASCADE;
CREATE TYPE "role" as enum ('administrator', 'moderator');
CREATE TYPE "scope" as enum ('authentication', 'authorization');
CREATE TYPE "action" as enum ('read', 'write');
@joshxyzhimself
joshxyzhimself / offline-gmaven-stable.zip - how to use Android Studio with downloads of offline Android Gradle plugin and Google Maven repository dependencies.md
Created July 14, 2022 06:28
offline-gmaven-stable.zip - how to use Android Studio with downloads of offline Android Gradle plugin and Google Maven repository dependencies.
View offline-gmaven-stable.zip - how to use Android Studio with downloads of offline Android Gradle plugin and Google Maven repository dependencies.md

Use the Android Gradle Plugin offline

This document describes how to use Android Studio with downloads of offline Android Gradle plugin and Google Maven repository dependencies.

Download and unzip offline components

If you haven’t already done so, download the offline components from the official Android Studio website: https://d.android.com/r/studio-offline/downloads .

@joshxyzhimself
joshxyzhimself / dev-env.md
Last active September 20, 2022 21:05
Development Environment
View dev-env.md
@joshxyzhimself
joshxyzhimself / https-during-dev.macos.sh
Created February 14, 2022 05:39 — forked from disintegrator/https-during-dev.macos.sh
Use Caddy, mkcert and dnsmasq to expose your development server over HTTPS
View https-during-dev.macos.sh
brew install caddy mkcert nss dnsmasq
mkcert -install
mkcert '*.app.test' '*.cdn.test'
# rename the certs and move them under /usr/local/etc/caddy/certs
cat <<EOF > /usr/local/etc/caddy/Caddyfile
*.app.test:443, *.cdn.test:443 {
@joshxyzhimself
joshxyzhimself / README.md
Last active February 4, 2022 01:12
Search Engine Comparisons
View README.md

Search Engine Comparisons

Concerns

  • Index Location
  • Ease of Installation
  • Ease of Configuration
  • Ease of Indexing
  • Ease of Searching
  • Ease of Scaling
View unofficial-bash-strict-mode.md

Unofficial Bash Strict Mode

Sometimes a programming language has a "strict mode" to restrict unsafe constructs. E.g., Perl has use strict, Javascript has "use strict", and Visual Basic has Option Strict. But what about bash? Well, bash doesn't have a strict mode as such, but it does have an unofficial strict mode:

set -euo pipefail

set -e