This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* This code organizes obsidian notes in format `YYYY-MM-DD.md` in the target directory into | |
| the following folder structure `YYYY/MM Month/YYYY-MM-DD.md` | |
| Examples | |
| /2023/07 July/2023-07-26.md | |
| /2023/08 August/2023-08-01.md | |
| /2023/10 October/2023-10-31.md | |
| */ | |
| package main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "os/exec" | |
| "sort" | |
| "strings" | |
| "time" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package duh | |
| import ( | |
| "context" | |
| "testing" | |
| "time" | |
| ) | |
| type DoThingRequest struct{} | |
| type DoThingResponse struct{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "compress/gzip" | |
| "fmt" | |
| "io" | |
| "log" | |
| "mime/multipart" | |
| "net/http" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "crypto/tls" | |
| "fmt" | |
| "log" | |
| "net" | |
| "net/smtp" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ``` | |
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: "root@your-server.com", | |
| sshPort: 22, | |
| // Optional: specify cluster if you have multiple |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "testing" | |
| bloom "github.com/bits-and-blooms/bloom/v3" | |
| ) | |
| func BenchmarkBloomFilterCheck(b *testing.B) { |