Skip to content

Instantly share code, notes, and snippets.

@derekr
derekr / sse_survival_guide.md
Last active November 12, 2025 22:44
SSE FAQ

This is just a stub doc for collecting any SSE related tips/tricks/considerations others in the Datastar community want to share. While it will likely serve as a helpful resource itself, the content will be used to author a more user friendly doc or artifact to reference when learning and leveraging SSE.

SSE FAQ

Are there any SSE gotchas?

There are some known gotchas for SSE documented here:

@dyoo
dyoo / cantor_pairing.go
Last active January 9, 2025 12:04
Cantor pairing function
// http://en.wikipedia.org/wiki/Pairing_function
package main
import (
"fmt"
"math"
)
func InvertedCantorPairing(z int) (int, int) {
w := int(math.Floor((math.Sqrt(float64(8*z+1)) - 1) / 2))
@plentz
plentz / nginx.conf
Last active October 22, 2025 16:10
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@robertsosinski
robertsosinski / trigger.sql
Created November 12, 2012 02:51
Make a table readonly in Postgres
create trigger trades_readonly_trigger before insert or update or delete or truncate on trades for each statement execute procedure readonly_trigger_function();