Skip to content

Instantly share code, notes, and snippets.

View jan-auer's full-sized avatar

Jan Michael Auer jan-auer

View GitHub Profile
@jan-auer
jan-auer / condition.rs
Created September 13, 2023 13:45
dynamic sampling evaluator
//! Types to specify conditions on data.
//!
//! The root type is [`RuleCondition`].
use relay_common::glob3::GlobPatterns;
use relay_protocol::{Getter, Val};
use serde::{Deserialize, Serialize};
use serde_json::{Number, Value};
use crate::utils;
@jan-auer
jan-auer / main.rs
Created September 14, 2022 09:50
Minimal Worker Pool
use std::sync::Arc;
use tokio::sync::Semaphore;
fn sync_code(i: i32) {
println!("task {}", i);
panic!("nope");
}
async fn run() {
@jan-auer
jan-auer / Cargo.toml
Last active September 6, 2022 16:13
Service example with polymorphic Addrs
[package]
name = "playground"
version = "0.1.0"
edition = "2021"
[dependencies]
tokio = { version = "1.20.0", features = ["full"] }
@jan-auer
jan-auer / example.c
Created February 5, 2020 17:17
Sentry Native SDK Tracing Example
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "sentry.h"
// --------------------------------------------------------------------
// VENDOR THIS CODE FOR SENTRY SDK
// --------------------------------------------------------------------
@jan-auer
jan-auer / example.rs
Created February 26, 2019 21:45
Rust Generics Example
use std::ops::Add;
// enum Foo<T, F>
// where
// F: FnOnce(T) -> T,
// {
// Data(T),
// Func(F),
// }
{
"event_id": "f45706e6390542a2830b8aac75043bf2",
"level": "fatal",
"transaction": "main at EventEmitter.ipcMain.on",
"message": "Error: Error triggered in main processes",
"release": "sentry-electron-test@2.0.2",
"environment": "development",
"user": {
"ip_address": "{{auto}}"
},

Keybase proof

I hereby claim:

  • I am jan-auer on github.
  • I am jauer (https://keybase.io/jauer) on keybase.
  • I have a public key whose fingerprint is A9DB 2598 A619 49E9 E35A 6632 80C6 37DB F0D4 C0A1

To claim this, I am signing this object: