- 3 keys:
0x33
- Ctrl key:
0x11
- Windows key:
0x5B
- Left arrow key:
0x25
- Right arrow key:
0x27
This file contains 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 renderer | |
import ( | |
"fmt" | |
"html/template" | |
"io" | |
"io/fs" | |
"path/filepath" | |
"sync" | |
) |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Golang Counter Component</title> | |
<link rel="shortcut icon" href="data:,"> | |
<style> | |
@media (prefers-color-scheme: dark) { | |
:root { |
This file contains 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 abortController = new AbortController() | |
fetch('/api/ndjson', { | |
headers: { accept: 'application/x-ndjson' }, | |
signal: abortController.signal, | |
}).then(async res => { | |
const reader = res.body.getReader() | |
const textDecoder = new TextDecoder() | |
try { |
This file contains 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 types | |
import ( | |
"context" | |
"fmt" | |
"io" | |
"time" | |
"github.com/btcsuite/btcutil/base58" | |
"github.com/vmihailenco/msgpack/v5" |
This file contains 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
{ | |
"New Bubble Tea Program": { | |
"prefix": "bubbletea", | |
"body": [ | |
"package main", | |
"", | |
"import (", | |
"\t\"fmt\"", | |
"\t\"os\"", | |
"", |
This file contains 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" | |
"os" | |
tea "github.com/charmbracelet/bubbletea" | |
) | |
func main() { |
This file contains 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 db | |
import ( | |
"context" | |
"database/sql" | |
"github.com/cockroachdb/cockroach-go/v2/crdb" | |
) | |
var ctxKeyTx = struct{ name string }{"ctx-key-tx"} |
This file contains 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 property | |
import ( | |
"fmt" | |
"strings" | |
"gopkg.in/yaml.v3" | |
) | |
// Properties list. |
NewerOlder