Skip to content

Instantly share code, notes, and snippets.

@savaki
savaki / claude_3.5_sonnet_artifacts.xml
Created June 27, 2024 01:48 — forked from dedlim/claude_3.5_sonnet_artifacts.xml
Claude 3.5 Sonnet, Full Artifacts System Prompt
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
@savaki
savaki / main.go
Created December 31, 2017 16:53
performance of kafka-go consumer group reader
package main
import (
"context"
"crypto/tls"
"crypto/x509"
"flag"
"fmt"
"io/ioutil"
"log"
@savaki
savaki / main.go
Last active August 22, 2022 09:27
comparison of confluent-kafka-go vs sarama-cluster consumer performance
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"fmt"
"io/ioutil"
"log"
"os"
@savaki
savaki / gist:afd87416d85439066702e8051f04878b
Created November 1, 2017 15:29
toy event source example
package main
import (
"context"
"fmt"
"log"
"time"
"github.com/altairsix/eventsource"
)
@savaki
savaki / drawing.go
Created April 30, 2015 01:59
Re: A Rust Contributor Tries Their Hand at Go
package main
import "os"
var (
Red = rgb(255, 0, 0)
Blue = rgb(0, 0, 255)
)
func rgb(red, green, blue int) Color {
package main
import (
"fmt"
"os/exec"
)
func main() {
// in this example, the offending docker code has been placed in a shell script
command := fmt.Sprintf("/bin/bash sample.sh")
package main
import (
"fmt"
"os/exec"
)
func main() {
command := fmt.Sprintf("echo 'this works'")
package main
import (
"fmt"
"os/exec"
)
func main() {
tag := "ec2-xxx-xxx-xxx-xxx.us-west-1.compute.amazonaws.com:5000/sample/app:1.0.20"
command := fmt.Sprintf("docker run -i --rm -t %s /bin/bash -c 'cat /etc/hosts'", tag)
<html>
<head>
<style type="text/css">
table table {
width: 600px !important;
}
table div + div { /* main content */
width: 65%;
float: left;
}