Skip to content

Instantly share code, notes, and snippets.

@encryptblockr
encryptblockr / api_backends.conf
Created June 18, 2022 22:14 — forked from nginx-gists/api_backends.conf
Deploying NGINX Plus as an API Gateway, Part 1
upstream warehouse_inventory {
zone inventory_service 64k;
server 10.0.0.1:80;
server 10.0.0.2:80;
server 10.0.0.3:80;
}
upstream warehouse_pricing {
zone pricing_service 64k;
server 10.0.0.7:80;
@encryptblockr
encryptblockr / blog20220516-01.cfg
Created June 18, 2022 21:34 — forked from haproxytechblog/blog20220516-01.cfg
Enable Sticky Sessions in HAProxy
frontend mywebapp
bind :80
mode http
default_backend webservers
backend webservers
mode http
balance roundrobin
cookie SERVER insert indirect nocache
server web1 192.168.56.20:80 check cookie web1
@encryptblockr
encryptblockr / blog20181001-01.cfg
Created June 18, 2022 21:32 — forked from haproxytechblog/blog20181001-01.cfg
Using HAProxy as an API Gateway, Part 1
frontend api_gateway
bind :443 ssl crt /etc/hapee-1.8/certs/cert.pem
acl PATH_cart path_beg -i /cart
acl PATH_catalog path_beg -i /catalog
use_backend be_cart if PATH_cart
use_backend be_catalog if PATH_catalog
backend be_cart
server s1 10.0.0.3:80
@encryptblockr
encryptblockr / README.md
Created April 4, 2022 18:39 — forked from tomdaley92/README.md
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@encryptblockr
encryptblockr / main.go
Created February 2, 2022 00:26 — forked from tfogo/main.go
Example use of Change Streams in Go
package main
import (
"context"
"fmt"
"log"
"os"
"time"
fuzz "github.com/google/gofuzz" // Used for creating random todo items
@encryptblockr
encryptblockr / gorm_joins.go
Created January 27, 2022 19:59 — forked from kavirajk/gorm_joins.go
Understanding Joins in gorm
package main
import (
"fmt"
"log"
"github.com/jinzhu/gorm"
_ "github.com/lib/pq"
)
package main
import (
"database/sql"
"fmt"
_ "github.com/lib/pq"
"log"
"time"
)
package main
import (
"github.com/gin-gonic/contrib/sessions"
"github.com/gin-gonic/gin"
"log"
"net/http"
"strings"
)
@encryptblockr
encryptblockr / Remote API via daemon.json.md
Created August 29, 2021 08:11 — forked from kekru/Remote API via daemon.json.md
Enable Docker Remote API via daemon.json
@encryptblockr
encryptblockr / .gitignore
Created August 21, 2021 17:17 — forked from md2perpe/.gitignore
StackOverflow 64497615
venv/
*.pyc