Skip to content

Instantly share code, notes, and snippets.

View SoMuchForSubtlety's full-sized avatar

Jakob SoMuchForSubtlety

View GitHub Profile
@SoMuchForSubtlety
SoMuchForSubtlety / upgrade.sh
Last active August 23, 2023 12:58
upgrade script for olm
#!/usr/bin/env bash
# This script is for upgrading OLM from a GitHub release
set -e
default_base_url=https://github.com/operator-framework/operator-lifecycle-manager/releases/download
if [[ ${#@} -lt 1 || ${#@} -gt 2 ]]; then
@SoMuchForSubtlety
SoMuchForSubtlety / timescale-chunk-stats.sql
Last active May 8, 2023 12:58
Get timescale hypertable chunk info with compression stats
select c.chunk_name,
to_char(range_start, 'YYYY-MM-DD HH24:MI') start,
to_char(AGE(range_end, range_start), 'DD "days" HH24 "hours"') as interval,
is_compressed,
pg_size_pretty(
CASE
WHEN cs.before_compression_total_bytes is null THEN cds.total_bytes
ELSE cs.before_compression_total_bytes END
) as before_total,
pg_size_pretty(after_compression_total_bytes) as after_total,
@SoMuchForSubtlety
SoMuchForSubtlety / certutil.go
Last active December 5, 2024 18:02
P12/PKCS#12 to tls.Certificate in Go
package certutil
import (
"crypto/tls"
"fmt"
"software.sslmate.com/src/go-pkcs12"
)
func PKCS12ToCertChain(pfxData []byte, password string) (tls.Certificate, error) {
@SoMuchForSubtlety
SoMuchForSubtlety / wsstomp.go
Created November 6, 2020 08:24
go-stomp websocket ReadWriteCloser
package wsstomp
import (
"io"
"github.com/gorilla/websocket"
)
type WebsocketSTOMP struct {
connection *websocket.Conn

Go Report Card

F1viewer

F1viewer requires an F1TV pro account to stream VODs!

preview image

Table of Contents

This file has been truncated, but you can view the full file.
{
"DIPLOBLASTIC": "Characterizing the ovum when it has two primary germinallayers.",
"DEFIGURE": "To delineate. [Obs.]These two stones as they are here defigured. Weever.",
"LOMBARD": "Of or pertaining to Lombardy, or the inhabitants of Lombardy.",
"BAHAISM": "The religious tenets or practices of the Bahais.",
"FUMERELL": "See Femerell.",
"ROYALET": "A petty or powerless king. [R.]there were at this time two other royalets, as only kings by hisleave. Fuller.",
"TROPHIED": "Adorned with trophies.The trophied arches, storied halls, invade. Pope.",
@SoMuchForSubtlety
SoMuchForSubtlety / swarm.py
Last active July 17, 2019 18:34
simple swarm
import sys
from threading import Thread
from random import seed
from random import random
from datetime import datetime
from PyQt5.QtCore import QCoreApplication, Qt, QLineF, QRectF, QTimer
from PyQt5.QtGui import QPainter, QColor, QFont, QKeySequence, QMouseEvent, QCursor
from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow, QPushButton, QAction, QMessageBox
from PyQt5.QtWidgets import QCheckBox, QProgressBar, QShortcut
import numpy as np
@SoMuchForSubtlety
SoMuchForSubtlety / main.go
Last active June 9, 2019 00:23
simple program to write a string to a file
package main
import (
"flag"
"fmt"
"os"
)
var (
content = flag.String("content", "", "what gets written to the file")