Skip to content

Instantly share code, notes, and snippets.

View tobz's full-sized avatar
💁‍♂️
it me

Toby Lawrence tobz

💁‍♂️
it me
View GitHub Profile
@tobz
tobz / datadog.yaml
Last active June 10, 2022 15:51 — forked from prognant/trace tool
apm_config:
# This points the `trace-agent` at Vector's `datadog_agent` source.
apm_dd_url: http://localhost:8081
# Set these to zero in order to avoid the Datadog Agent sampling traces before sending
# them to Vector, which will skew computed statistics like request count, or success vs
# error span count, etc.
max_traces_per_second: 0
errors_per_second: 0
@tobz
tobz / playground.rs
Last active September 18, 2018 19:26 — forked from rust-play/playground.rs
Code shared from the Rust Playground
extern crate tokio; // 0.1.8;
extern crate futures; // 0.1.24;
use futures::sync::mpsc;
use futures::{task, Async, Future, Sink, Stream};
pub fn invoke_bpm_battle_warm_up( // this method is called from the poll parent method
receiver: &mut Option<mpsc::Receiver<bool>>,
msg: BattleWarmUp,
addr: Addr<Bpm>,
@tobz
tobz / playground.rs
Last active August 1, 2018 22:53 — forked from vi/playground.rs
Code shared from the Rust Playground
#!/usr/bin/env run-cargo-script
// cargo-deps: tokio, tokio-codec, tokio-io, futures-cpupool
extern crate tokio;
extern crate tokio_codec;
use tokio_codec::{Framed, LinesCodec};
use tokio::net::TcpListener;
use tokio::prelude::*;
@tobz
tobz / playground.rs
Created July 3, 2018 00:10 — forked from rust-play/playground.rs
Code shared from the Rust Playground
let pipeline = framed_reader
26 .map(move |b| {
25 let message: proto::Message = bincode::deserialize(&b).unwrap();
24 let file;
23 match message {
22 proto::Message::Request(m) => {
21 file = m.file.clone();
20 }
19 _ => {
18 panic!("Message incorrect")