Skip to content

Instantly share code, notes, and snippets.

// Dashboard represents a Datadog Dashboard.
type Dashboard struct {
ID int64 `json:"id"`
ReadOnly bool `json:"read_only"`
Description string `json:"description"`
Title string `json:"title"`
Graphs []struct {
Definition struct {
Viz string `json:"viz"`
Requests []struct {
@arkan
arkan / safebuffer.go
Last active May 19, 2021 21:54
Golang: Buffer is a goroutine safe bytes.Buffer
package safebuffer
import (
"bytes"
"sync"
)
// Buffer is a goroutine safe bytes.Buffer
type Buffer struct {
buffer bytes.Buffer
@arkan
arkan / docker_logs.sh
Last active November 6, 2017 15:34
Docker logs on multiple containers
#!/bin/bash
#
# Usage:
# ./docker_logs.sh $(docker ps -q)
while [ $# -ne 0 ]
do
(docker logs -f -t --tail=10 $1|sed -e "s/^/$1: /")&
shift
done
@arkan
arkan / gmail-github-filters.md
Created December 1, 2018 15:05 — forked from ldez/gmail-github-filters.md
Gmail and GitHub - Filters

Gmail and GitHub

Create new filters and create new labels.

Pull Request

from:([email protected]) AND {"Patch Links" "approved this pull request." "requested changes on this pull request." "commented on this pull request." "pushed 1 commit." "pushed 2 commits." "pushed 3 commits."}

label: gh-pull-request

@arkan
arkan / github.go
Last active October 7, 2023 13:03
Example to automatically update a binary as soon as a new Github release is published.
package github
import (
"archive/tar"
"compress/gzip"
"context"
"fmt"
"io"
"net/http"
"os"
@arkan
arkan / ocr-mistral.go
Last active March 11, 2025 14:59
ocr-mistral.go
package invoicing
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"mime/multipart"
"net/http"
@arkan
arkan / instructions.md
Created January 29, 2026 10:36
Enable-3-layer-memory in Clawd/Moltbot

Three-Layer Memory System

Set up a self-maintaining, compounding knowledge graph that evolves automatically.

Architecture

Layer 1: Knowledge Graph   (life/areas/)
  └── Entities with atomic facts + living summaries