Skip to content

Instantly share code, notes, and snippets.

View bubbajoe's full-sized avatar
🏠
Working from home

Joe Williams bubbajoe

🏠
Working from home
View GitHub Profile
@bubbajoe
bubbajoe / script.js
Created March 8, 2024 23:32 — forked from tetebueno/script.js
K6 website test
import http from 'k6/http';
import { check, sleep } from 'k6';
export const URL = 'https://test.k6.io';
export default function () {
let res = http.get(URL);
check(res, {
'resource returns status 200': (r) => r.status === 200,
});
@bubbajoe
bubbajoe / proxy.go
Created September 6, 2022 16:16
HTTP2 Golang Proxy w/ Load Balancer
package main
// TARGET='http://localhost:3006/,http://localhost:3006/,http://localhost:3001' go run proxy.go
import (
"io"
"log"
"net"
"net/http"
"net/url"
@bubbajoe
bubbajoe / exposed_ext.kt
Last active December 12, 2021 12:56
Exposed Json Extension (works for MySQL)
import org.jetbrains.exposed.sql.Column
import org.jetbrains.exposed.sql.ColumnType
import org.jetbrains.exposed.sql.Table
fun <T : Any> Table.json(name: String, klass: Class<T>): Column<T> =
registerColumn(name, JsonTyped(klass))
class JsonTyped<T : Any>(private val klass: Class<T>) : ColumnType() {
private val mapper = defaultObjectMapper // Please change this to whatever