Skip to content

Instantly share code, notes, and snippets.

View ssoroka's full-sized avatar
👾

Steven Soroka ssoroka

👾
View GitHub Profile
@ssoroka
ssoroka / extension.js
Last active July 24, 2019 18:42
upgrade to dark slack.
// First make sure the wrapper app is loaded
document.addEventListener("DOMContentLoaded", function() {
// Then get its webviews
let webviews = document.querySelectorAll(".TeamView webview");
// Fetch our CSS in parallel ahead of time
const cssPath = 'https://raw.githubusercontent.com/Nockiro/slack-black-theme/master/custom.css';
let cssPromise = fetch(cssPath).then(response => response.text());
@ssoroka
ssoroka / patch.diff
Last active August 8, 2019 04:22
golang.org/x/text go modules WIP
diff --git a/cmd/gotext/common.go b/cmd/gotext/common.go
index 51322db..03e85db 100644
--- a/cmd/gotext/common.go
+++ b/cmd/gotext/common.go
@@ -6,16 +6,6 @@ package main
import (
"fmt"
- "go/build"
- "go/parser"
@ssoroka
ssoroka / LineProtocolPayload.txt
Last active July 29, 2020 19:19 — forked from shantanoo-desai/LineProtocolPayload.txt
telegraf configuration file that connects to Mosquitto Open broker and pushes data into InfluxDB v1.x
# IOT/sensor2/temp
env,type=A temp=23.39
env,type=B temp=40.00
# IOT/sensor1/acc
env,type=A x=0.2
env,type=B x=1.3
func get[I, O any](api huma.API, path string, handler func(context.Context, *I) (*O, error), roles ...models.Role) {
huma.Register(api, huma.Operation{
DefaultStatus: http.StatusOK,
Method: http.MethodGet,
Path: path,
Security: []map[string][]string{
{
"bearer": {"jwt"},
"roles": rolesToStrings(roles...),
},