Skip to content

Instantly share code, notes, and snippets.

Michael Nitschinger daschl

Block or report user

Report or block daschl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
src/ 76:21 error: expected a literal
src/ writeln!(t, message).unwrap();
View gist:8934949
addNode().mapMany(new Function<Boolean, Composable<Boolean>>() {
public Composable<Boolean> apply(Boolean success) {
return addService();
}).mapMany(new Function<Boolean, Composable<String>>() {
public Composable<String> apply(Boolean success) {
return loadRawConfig();
daschl / gist:8934453
Last active Aug 29, 2015
any idea how I can make this nicer?
View gist:8934453
public Promise<String> load() {
final Deferred<String,Promise<String>> deferred = Promises.defer(env.reactorEnv());
addNode().consume(new Consumer<Boolean>() {
public void accept(Boolean success) {
if(success) {
addService().consume(new Consumer<Boolean>() {
public void accept(Boolean success) {
View gist:9130306
/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/bin/java -ea -DperfReportDir=/Users/michael/netty/microbench/target/reports/performance/ -Didea.launcher.port=7535 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA IDEA
private final Queue<Event<CouchbaseRequest>> queue = new ArrayDeque<Event<CouchbaseRequest>>();
final class EventResponseDecoder extends MessageToMessageDecoder<CouchbaseResponse> {
protected void decode(ChannelHandlerContext ctx, CouchbaseResponse in, List<Object> out) throws Exception {
Event<CouchbaseRequest> event = queue.poll();
((Deferred) event.getReplyTo()).accept(in);
daschl /
Last active Aug 29, 2015
Flush me maybe!
* Helper method to flush the pipeline if possible.
* Hey, I just connected you,
* And this is crazy,
* But here's my data,
* So flush me maybe!
* It's hard to read right,
* From your channel,
* But here's my data,
View gist:9320766
/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/java -Didea.launcher.port=7545 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/htmlconverter.jar:/Li
daschl /
Created Mar 3, 2014
ohne das array zu touchen
int start = 8192;
int toFind = 32768;
int data[] = new int[] {start, 16384, toFind, 65536}; // 2^13, ^14, ^15, ^16
for (int i = 0; i < 4; i++) {
if (start << i == toFind) {
package bench;
* A new Query implementation trimmed for performance.
public class FastQuery {
private static final int PARAM_REDUCE_OFFSET = 0;
View java.rb
require 'java'
java_import com.couchbase.client.CouchbaseClient
java_import java.util.Arrays
java_import java.util.concurrent.TimeUnit
hosts = Arrays::as_list(URI::create(''))
client =, 'default', '')
You can’t perform that action at this time.