Skip to content

Instantly share code, notes, and snippets.

View halfvector's full-sized avatar
😄

Alex Barkan halfvector

😄
View GitHub Profile

Keybase proof

I hereby claim:

  • I am halfvector on github.
  • I am unbuffered (https://keybase.io/unbuffered) on keybase.
  • I have a public key whose fingerprint is 7A4B 8DA9 C9EB 52B4 15EA DDDF BA7F EFC2 45B4 04E7

To claim this, I am signing this object:

@halfvector
halfvector / run-datadog-osx.sh
Last active June 20, 2019 20:11
Running Datadog via Docker on OSX with APM and StatsD exposed to host
#!/bin/sh
# Don't forget to get an API key from https://app.datadoghq.com/account/settings#api
# DD_DOGSTATSD_NON_LOCAL_TRAFFIC = statsd on host even on OSX using native docker engine.
docker run -d --rm --name dd-agent \
-p 8126:8126/tcp -p 8125:8125/udp \
-v /var/run/docker.sock:/var/run/docker.sock:ro -v /proc/:/host/proc/:ro \
-e DD_API_KEY=$your_api_key_here \
-e DD_APM_ENABLED=true -e DD_APM_ENV=localhost -e DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true \
datadog/agent
@halfvector
halfvector / s3-sqs-sample.go
Created August 3, 2020 19:21
Using aws-sdk-go to pickup file changes from S3 via S3->SNS->SQS
package main
import (
"encoding/json"
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/sqs"
"io/ioutil"
@halfvector
halfvector / docker-ryzentosh.txt
Last active May 10, 2023 22:18
Latest Docker on Ryzentosh
# so at the time of writing, hyperkit doesn't work on AMD/Ryzen.
# this means no native docker support.
# the default docker-machine setup uses the deprecated boot2docker which is stuck with a buggy docker-19.
# i'm looking to run the latest docker daemon, have proper service-hostnames, and easy port-forwarding,
# and use the same docker-compose setups as a normal OSX/Linux machine.
# install the latest docker-host VM from https://github.com/burmilla/os/releases
# boot2docker and rancherOS are now both deprecated/unsupported.
# burmillaOS is an active fork of rancherOS.
docker-machine create -d virtualbox --virtualbox-boot2docker-url https://github.com/burmilla/os/releases/download/v1.9.0/burmillaos-v1.9.0.iso --virtualbox-memory 1500 default