Skip to content

Instantly share code, notes, and snippets.

View adoublef's full-sized avatar

Kristopher adoublef

  • 11:42 (UTC +01:00)
View GitHub Profile
package main
import (
"context"
"crypto/md5"
"fmt"
"log"
"os"
"path/filepath"
orders(10000002): <nil> = resp.Body.Close()
SIGQUIT: quit
PC=0x47a441 m=0 sigcode=0
goroutine 0 gp=0x9b7420 m=0 mp=0x9b84e0 [idle]:
runtime.futex(0x9b8620, 0x80, 0x0, 0x0, 0x0, 0x0)
/root/go/pkg/mod/golang.org/[email protected]/src/runtime/sys_linux_amd64.s:557 +0x21 fp=0x7fff88b99868 sp=0x7fff88b99860 pc=0x47a441
runtime.futexsleep(0x7fff88b998e0?, 0x9b7420?, 0x7fff88b998e0?)
/root/go/pkg/mod/golang.org/[email protected]/src/runtime/os_linux.go:75 +0x30 fp=0x7fff88b998b8 sp=0x7fff88b99868 pc=0x437d90
runtime.notesleep(0x9b8620)
@adoublef
adoublef / main.go
Last active June 11, 2025 11:53
Evetech
package main
import (
"context"
"encoding/csv"
"encoding/json"
"fmt"
"log"
"net/http"
"os"
@adoublef
adoublef / bloom.go
Last active December 28, 2024 20:58
Data Structures
// Copyright 2024 Kristopher Rahim Afful-Brown. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package probabilistic
type Hasher interface {
Hash(p []byte) uint64
}
@adoublef
adoublef / client.go
Last active December 6, 2024 22:23
server-sent events
// Copyright 2024 Kristopher Rahim Afful-Brown. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package sse
package sse
import (
"bufio"
// Copyright 2024 Rahim Afful-Brown. All Rights Reserved.
//
// Distributed under MIT license.
// See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
package copy_test
import (
"bufio"
"io"
package aesctr256hmacsha256_test
import (
"crypto/aes"
"crypto/cipher"
"embed"
"encoding/hex"
"io"
"os"
"testing"
@adoublef
adoublef / role.go
Created May 13, 2024 10:43
Roles using enums
package journal
import (
"database/sql/driver"
"errors"
"fmt"
)
type Role int
@adoublef
adoublef / cockroachdb.go
Created March 17, 2024 20:22
Testcontainers
package ccdb
import (
"context"
"fmt"
tc "github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/wait"
)
@adoublef
adoublef / client.go
Created March 17, 2024 20:05
Golang SMTP
package smtp
import (
"crypto/tls"
"fmt"
"net/smtp"
"net/url"
"strings"
)