Skip to content

Instantly share code, notes, and snippets.

View thrawn01's full-sized avatar
🎯
Focusing

Derrick J. Wippler thrawn01

🎯
Focusing
View GitHub Profile

Technical Specification Development Prompt

You will act as a senior software developer helping create detailed technical specifications for maintaining, adding features, and refactoring code. Your role is research and planning only - you MUST NOT include interface definitions or implementation details in the final specification.

Process Overview

  1. Research Phase: Investigate codebase and clarify requirements through targeted questions
  2. Analysis Phase: Evaluate approaches and present trade-offs for user decision
  3. Documentation Phase: Produce formal technical specification for implementation
  4. Review Phase: Validate specification completeness and clarity through sub-agent review
  5. Finalization: Deliver approved specification
@thrawn01
thrawn01 / bloom_test.go
Created August 13, 2025 20:02
Benchmark BloomFilters (Created by AI)
package main
import (
"fmt"
"testing"
bloom "github.com/bits-and-blooms/bloom/v3"
)
func BenchmarkBloomFilterCheck(b *testing.B) {
const pulumi = require("@pulumi/pulumi");
const uncloud = require("@uncloud/pulumi");
// Configure the Uncloud provider
const provider = new uncloud.Provider("uncloud-provider", {
// Connect to any machine in the cluster via SSH
sshHost: "[email protected]",
sshPort: 22,
// Optional: specify cluster if you have multiple
@thrawn01
thrawn01 / wal.go
Created December 11, 2024 12:24
Solving the WAL problem domain
// Separating the WAL implementation hides the state complexity currently in *DB
// behind a simple problem domain -- Write and retrieve entries from the log.
//
// An additional benefit is this allows a user the option to write the WAL to
// local disk, or some other durable storage. While still maintaining the
// memtables in the object store.
w := wal.New(wal.Config{
// Store could be S3, or local file system depending on how the
// user wants slateDB to operate.
Store: NewTableStore(bucket, sstable.Config{}, "/path"),
```
Create partition {QueueName:queue-00188 StorageName:badger-0 ReadOnly:false Partition:0}
badger 2024/09/12 14:59:20 INFO: All 0 tables opened in 0s
badger 2024/09/12 14:59:20 INFO: Discard stats nextEmptySlot: 0
badger 2024/09/12 14:59:20 INFO: Set nextTxnTs to 0
sync.loop
runtime: newstack sp=0x17efc2f00 stack=[0xc0002b4000, 0xc0002b8000]
morebuf={pc:0x104e86b30 sp:0x17efc2f00 lr:0x0}
sched={pc:0x104f098c0 sp:0x17efc2f00 lr:0x104e86b30 ctxt:0x0}
runtime: gp=0xc0002f4700, goid=46424, gp->status=0x2
@thrawn01
thrawn01 / smtp.go
Last active October 6, 2023 20:10
Basic SMTP Client
package main
import (
"crypto/tls"
"fmt"
"log"
"net"
"net/smtp"
)
@thrawn01
thrawn01 / main.go
Created September 18, 2023 16:14
HTTP gzip multipart form data client
package main
import (
"bytes"
"compress/gzip"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
@thrawn01
thrawn01 / retry_test.go
Created September 11, 2023 16:32
retry package which can be used with clients that implement `duh`
package duh
import (
"context"
"testing"
"time"
)
type DoThingRequest struct{}
type DoThingResponse struct{}
@thrawn01
thrawn01 / search.go
Created August 1, 2023 15:00
Some golang code to search all commit hashes in a repo, including lost and unreachable hashes to find the string 'steve'.
package main
import (
"bytes"
"fmt"
"os/exec"
"sort"
"strings"
"time"
)
@thrawn01
thrawn01 / tag-daily-notes.go
Created July 23, 2023 15:42
Tag all daily notes with #daily-notes
// This code is used to re-tag my daily notes from front matter style to `#tag` style and add
// a #daily-notes tag to each note. I'm saving it here as it might be useful as a template for
// others or myself in the future.
package main
import (
"fmt"
"os"
"path/filepath"
"regexp"