Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am astubbs on github.
  • I am psynikal (https://keybase.io/psynikal) on keybase.
  • I have a public key ASB3RSeWJFOahf4h4pZtFQ6GVakSob5Wtnyq4n64OqngPAo

To claim this, I am signing this object:

@astubbs
astubbs / demo.svg
Last active October 13, 2021 16:48
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@astubbs
astubbs / papi-talk-abstract.md
Created June 19, 2018 09:36
Abstract: Beyond the DSL—Unlocking the power of Kafka Streams with the Processor API

Kafka Streams is a flexible and powerful framework. The Domain Specific Language (DSL) is an obvious place from which to start, but not all requirements fit the DSL model.

Many people are unaware of the Processor API (PAPI) - or are intimidated by it because of sinks, sources, edges and stores - oh my! But most of the power of the PAPI can be leveraged, simply through the DSL #process method, which lets you attach the general building block Processor interface to your -easy to use- DSL topology, to combine the best of both worlds.

In this talk you’ll get a look at the flexibility of the DSL’s process method and the possibilities it opens up. We’ll use real world use-cases borne from extensive experience in the field with multiple customers to explore power of direct write access to the state stores and how to perform range sub-selects. We’ll also see the options that punctuators bring to the table, as well as opportunities for major latency optimisations.

Key takeaways:

  • Understanding of how to combi
@astubbs
astubbs / sleepin.fish
Created September 28, 2015 08:55
Fish function to sleep your computer in x seconds
function sleepin
echo "Sleeping in $argv minutes..."
set rest (math "$argv*60")
sleep $rest
#echo "Sleeping now..."
pmset sleepnow
end
@astubbs
astubbs / curltime.fish
Created September 28, 2015 08:41
Fish function to time connection and transfer speeds of http requests
function curltime
curl -o /dev/null -s -w "%{time_connect} + %{time_starttransfer} = %{time_total}\n" $argv
end
Timeout timeout = new Timeout(Duration.parse("20 seconds"));
Future<Object> future = Patterns.ask(myActor, new ClientMessage(null), timeout);
Promise<Object> sdf = Akka.asPromise(future);
Promise<Result> r2 = sdf.map(new Function<Object, Result>() {
@Override
public Result apply(Object a) throws Throwable {
val wsrm = (MyMessage)a;
return ok((wsrm).val); // String value from message object
child process exited abnormally
child process exited abnormally
while executing
"close $fd"
(procedure "rescan_stage2" line 7)
invoked from within
"rescan_stage2 file1192de8 ui_ready"