Skip to content

Instantly share code, notes, and snippets.

View bahlo's full-sized avatar

Arne Bahlo bahlo

View GitHub Profile
use log::{Level, Metadata, Record};
use serde_json::{json, Value as JsonValue};
use std::sync::{Arc, Mutex};
pub struct Logger {
axiom_token: String,
axiom_dataset: String,
client: reqwest::blocking::Client,
buffer: Arc<Mutex<Vec<JsonValue>>>,
@bahlo
bahlo / docker-compose.yml
Created October 28, 2021 12:27
Run Axiom locally with Postgres and Minio
version: '3.2'
volumes:
postgres_data:
minio_data:
services:
axiom-db:
image: axiomhq/axiom-db:1.13.0
environment:
@bahlo
bahlo / rpn.go
Created July 11, 2014 23:04
A RPN calculator: Haskell vs. Go
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
@bahlo
bahlo / apm_bundle.sh
Last active August 29, 2015 13:57
Bash function to add support for an Atomfile in APM (Atom Package Manager). Note that this is only a quick hack, until Atom provides an own version of this or makes it's package manager open source.
# Put this in your ~/.(bash|zsh|*)rc file
# Usage: apm bundle
# For an example Atomfile, look here: https://github.com/bahlo/dotfiles/tree/master/atom.symlink
function apm() {
REAL_APM="/usr/local/bin/apm"
if [[ $# -eq 0 ]]; then
$REAL_APM $1
echo "<command> can also be bundle."
echo
@bahlo
bahlo / id_rsa.pub
Last active December 31, 2015 11:09
Here are my public keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDE9yuE4Jkl44l7MU7gb2WxUwKaZSmX+rdnl0N441s3hwIgqdF1MNr/XWZmsy3b1WZUFP98Zs8/GAF3PmbaKuYwPBEwMaty7XsPhgUhg/dEeDVGc3QqEWQ8ET6J6GABPOr87uAhmn8uU5yHENW+pBrY5bD11i5zbNg9+HthBta0w/WaiZmjYHRw7mot/vFtAfD3Zx9UAtZdU1thuj8agylnFfLrd99eous30nX3s29ZlG9T0mdzSqwflaiRCepW704G3q1Y26kalty+Oq5QyGHyVXNmza/I5WNTivGdzXV3lJCRhdVSDcFB+p4K0p8j7TH6Zo+9w5QzNISv6DB2eQjX29iMHQu30ViUSqB5DXB2xiRF1xDuCGAlgaAA+9sOW2SOeM8UUYwP37BTHLFBbsXCp9DN4YbmPhMuZdxTxkL9cDJcjjP5SVugWKLX1AkqRsBih5YliejQHI0K+J7o2V8qKHcP82Lwz/6X+N/E47ZrcV9n3HBi+IHXdxiiNAoJAot7EyrjA+xiyzh/YTEa+GZzNDyPmSIBuT+gLD0BJL9tTIEKXk5Ye1mjQAj+DnIt6lu25uek1WWLR9w8fNLJeNPc7+QmOeZ7wNMtTlC76G5lvSl6ECyR9DPencQPrjP25saGfNnmAVPslN8kC7Z8alry4+0PNGoscQWSsFZVTOu4eQ== [email protected]