Skip to content

Instantly share code, notes, and snippets.

Avatar

Josh joshxyzhimself

View GitHub Profile
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 Sep 18, 2022
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
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 Jul 14, 2022
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 Sep 20, 2022
Development Environment
View dev-env.md
@joshxyzhimself
joshxyzhimself / https-during-dev.macos.sh
Created Feb 14, 2022 — 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 Feb 4, 2022
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

View Account.jsx
// rendered at http://localhost:8080/account
export const Account = (props) => {
const { user } = props;
return (
<div>
{ user.username }
</div>
);
};