Skip to content

Instantly share code, notes, and snippets.

View ezodude's full-sized avatar
🪡
Making agentic apps work

Ezo Saleh ezodude

🪡
Making agentic apps work
View GitHub Profile
@njpearman
njpearman / claude_35_artifacts_system_prompt.txt
Last active September 21, 2024 02:01
Extracted Claude 3.5 Sonnet system prompt for artifacts
<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
@huksley
huksley / mrsk.md
Last active January 12, 2024 17:24
mrsk - the missing manual

MRSK

This documentation adds important additions to the docs for mrsk deploy tool (see github.com/mrsked/mrsk)

Destination flag

You can use mrsk deploy --destination staging

This will read config/deploy.yml and config/deploy.staging.yml files, and also will read .env.staging file if it exists.

@ezodude
ezodude / trace.go
Created November 27, 2020 13:39
Trace Caller - great for debugging Golang code.
func trace(){
pc := make([]uintptr, 10) // at least 1 entry needed
runtime.Callers(2, pc)
f := runtime.FuncForPC(pc[0])
file, line := f.FileLine(pc[0])
fmt.Printf("%s:%d %s\n", file, line, f.Name())
}
@bodhi
bodhi / Dockerfile
Created May 22, 2019 00:18
Burn git commit SHA into docker image
FROM golang:1.12 AS build
COPY ./main.go .
# ARG here is to make the sha available for use in -ldflags
ARG GIT_SHA
# -ldflags "-X main.sha=${GIT_SHA}" allows main.sha to be set at build time
RUN go build -ldflags "-X main.sha=${GIT_SHA}" -o /app
FROM scratch
@yinzara
yinzara / github_bitbucket_multiple_ssh_keys.md
Last active November 2, 2024 23:40
Managing SSH keys and repo cloning using multiple accounts on GitHub and BitBucket

Why Multiple SSH keys?

There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket

You may use the same computer for work and personal development and need to separate your work.

When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.

You may have different projects you're working on where you would like to segregate your access.

@ZenGround0
ZenGround0 / client.go
Last active August 8, 2023 04:55
golang http auto-streaming with transfer-encoding: chunked
package main
import (
"net/http"
"net/url"
"os"
"fmt"
)
@brandoncc
brandoncc / config.yml
Last active October 26, 2018 17:47
nanobox circleci config
version: 2
jobs:
test-job:
machine: true
steps:
- checkout
- run: sudo bash -c "$(curl -fsSL https://s3.amazonaws.com/tools.nanobox.io/bootstrap/ci.sh)"
- run: nanobox evar add local CLOUDINARY_API_KEY=$CLOUDINARY_API_KEY
import (
"database/sql"
"github.com/lib/pq"
)
dbb, _ := sql.Open("postgres", "postgres://Amogh:amogh@localhost:6431/dblog?sslmode=disable")
dbb.SetMaxIdleConns(10)
dbb.SetMaxOpenConns(10)
dbb.SetConnMaxLifetime(0)
a := time.Now()
txn, err := dbb.Begin()
@cschiewek
cschiewek / x11_docker_mac.md
Last active November 6, 2024 12:03
X11 in docker on macOS

To forward X11 from inside a docker container to a host running macOS

  1. Install XQuartz: https://www.xquartz.org/
  2. Launch XQuartz. Under the XQuartz menu, select Preferences
  3. Go to the security tab and ensure "Allow connections from network clients" is checked.
  4. Run xhost + ${hostname} to allow connections to the macOS host *
  5. Setup a HOSTNAME env var export HOSTNAME=`hostname`*
  6. Add the following to your docker-compose:
 environment:
@bvis
bvis / README.md
Last active August 9, 2024 18:34
Docker Env Vars expanded with secrets content

Variables by Secrets

Sample script that allows you to define as environment variables the name of the docker secret that contains the secret value. It will be in charge of analyze all the environment variables searching for the placeholder to substitute the variable value by the secret.

Usage

You can define the next environment variables: