Skip to content

Instantly share code, notes, and snippets.

@matthauck
matthauck / GrpcTestClient_api.gen.cpp
Last active April 22, 2022 23:47
GRPC Client API
#include "GrpcTestClient_api.gen.h"
#include "NetworkAsync/HTTPAsync/AsyncHTTPHeaders.h"
#include "Core/Ownership/MakeUnique.h"
namespace
{
const char* const kService = "GrpcTest";
} // namespace
GrpcTestGRPCClient::GrpcTestGRPCClient( GrpcClientConnection& connection )
@matthauck
matthauck / Cargo.toml
Created March 23, 2020 18:55
async-trait, issue #75
[package]
name = "async-trait-75"
version = "0.1.0"
authors = []
edition = "2018"
[dependencies]
async-trait = "0.1.17"
tokio = { version = "0.2.13", features = [ "rt-threaded", "macros" ] }
@matthauck
matthauck / 1. run.sh
Created October 7, 2018 20:45
pihole and cloudflared on docker
#!/bin/bash
set -e
pushd cloudflared
docker build . -t cloudflared
popd
set +e
@matthauck
matthauck / Cargo.lock
Last active September 25, 2018 21:59
Nested futures deadlock
[[package]]
name = "arrayvec"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bitflags"
use std::sync::Arc;
use std::sync::mpsc::{SyncSender, sync_channel};
use std::thread;
use futures::{self, Async, Future};
use futures::executor::{Notify, Spawn};
pub type VoidFuture = Box<Future<Item = (), Error = ()>>;
pub fn consume(mut fut: VoidFuture) {
[root]
name = "iron-issue-444"
version = "0.1.0"
dependencies = [
"env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)",
"iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"logger 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"router 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",

Keybase proof

I hereby claim:

  • I am matthauck on github.
  • I am matthauck (https://keybase.io/matthauck) on keybase.
  • I have a public key whose fingerprint is CC51 505B 00FE E248 09D1 71F2 F313 3993 866C CD32

To claim this, I am signing this object:

@matthauck
matthauck / build.gradle
Created July 15, 2014 06:39
Run spring-boot jar from gradle
task(boot, dependsOn: bootRepackage) << {
exec {
executable = 'java'
args = [ '-jar', jar.archivePath ]
}
}
@matthauck
matthauck / JerseyConfig.java
Last active August 29, 2015 14:03
jersey2 spring bridge
package com.foo;
import javax.inject.Inject;
import org.glassfish.hk2.api.ServiceLocator;
import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.context.ApplicationContext;
public class JerseyConfig extends ResourceConfig {
@matthauck
matthauck / TomcatPlugin.groovy
Created August 26, 2013 06:40
simple gradle forking tomcat plugin (intended to be put in buildSrc)
package com.foo
import org.gradle.api.DefaultTask
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.GradleException
import org.gradle.api.file.FileCollection
import org.gradle.api.tasks.TaskAction
import org.gradle.api.plugins.WarPlugin