Skip to content

Instantly share code, notes, and snippets.

@cpu
cpu / embedjws.go
Created August 25, 2017 14:22
A small Go program using go-jose.v2 to generate an example JWS in the ACME V1 style.
package main
import (
"crypto/rand"
"crypto/rsa"
"fmt"
"os"
"gopkg.in/square/go-jose.v2"
)
@goliatone
goliatone / README.md
Last active October 19, 2024 10:43 — forked from colophonemes/create_triggers
Postgres TRIGGER to call NOTIFY with a JSON payload

This TRIGGER function calls PosgreSQL's NOTIFY command with a JSON payload. You can listen for these calls and then send the JSON payload to a message queue (like AMQP/RabbitMQ) or trigger other actions.

Create the trigger with notify_trigger.sql.

When declaring the trigger, supply the column names you want the JSON payload to contain as arguments to the function (see create_triggers.sql)

The payload returns a JSON object:

@TheRealFlyingCoder
TheRealFlyingCoder / Cloud Run & Remix
Last active September 30, 2024 19:56
Remix & Cloud Run
So you want to set up remix in cloud run huh? It's pretty simple but i'm going to assume you can figure out most of the GCP UI on your own.
Cloud Run:
Step 1: Create a new service and take note of the service ID
Step 2: Allow all traffic in the /triggers tab
Cloud Build:
Step 1: Set up a Cloud Build trigger on your repo
Step 2: Point the configuration to "cloud build configuration file" at the root of your project
Step 3: Add the following to the substitution variables (so you can keep it safe):