Skip to content

Instantly share code, notes, and snippets.

Mark Raynsford io7m

View GitHub Profile
View gist:43e8d3bf0fb1f3d0bbbeda3a69e2b19a
https://github.com/io7m/coffeepick
# Start up the shell
[rm@almond coffeepick]$ java -jar com.io7m.coffeepick.shell/target/com.io7m.coffeepick.shell-0.0.1-main.jar
User directory: /home/rm/local/coffeepick
Loading repositories…
INFO com.io7m.coffeepick.client.vanilla.CoffeePickCatalog: setting up repository from provider net.java.jdk (urn:net.java.jdk)
INFO com.io7m.coffeepick.client.vanilla.CoffeePickCatalog: setting up repository from provider net.adoptopenjdk.raw (urn:net.adoptopenjdk.raw)
View gist:ddc4e94e22b56dbcbe41ef10dcc5b3ca
package com.io7m.aeron_guide.scratchpad;
import io.aeron.Aeron;
import io.aeron.ChannelUriStringBuilder;
import io.aeron.ConcurrentPublication;
import io.aeron.Publication;
import io.aeron.Subscription;
import io.aeron.driver.MediaDriver;
import io.aeron.logbuffer.Header;
import org.agrona.BufferUtil;
View gist:9d512e2ad035a4543dc82b6e4b75964b
Script started on 2017-08-20 15:59:53+0000
someone@copperhead:~/git/com.github/rncbc/drumkv1copperhead$ ./configure --prefix=/opt/drumkv1
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
View gist:f97226a950c17470ea0ca7f7c08d647f
private static <K, V> SortedMap<K, V> sortedMapOf(
final Value<V> seq,
final Function<V, K> key)
{
return TreeMap.of(seq.map(v -> Tuple.of(key.apply(v), v)));
}
@io7m
io7m / gist:fd64fe18f9a94e83c1b64101e122aa1d
Created Nov 3, 2016
Validation example using entirely list-of-error Validations
View gist:fd64fe18f9a94e83c1b64101e122aa1d
import javaslang.Function1;
import javaslang.collection.List;
import javaslang.control.Validation;
import java.util.Properties;
import static javaslang.control.Validation.invalid;
import static javaslang.control.Validation.valid;
/**
@io7m
io7m / gist:8b8bf4c208e9a067a87786e8d8499097
Created Nov 3, 2016
Validation example using a mix of single-error Validations and list-of-error Validations
View gist:8b8bf4c208e9a067a87786e8d8499097
import javaslang.Function1;
import javaslang.collection.List;
import javaslang.control.Validation;
import java.util.Properties;
import static javaslang.control.Validation.invalid;
import static javaslang.control.Validation.valid;
/**
View gist:9f715be9440eb020362b66928413735e
import com.jogamp.common.nio.Buffers;
import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.opengl.DebugGL3;
import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL3;
import com.jogamp.opengl.GLCapabilities;
import com.jogamp.opengl.GLContext;
import com.jogamp.opengl.GLProfile;
import java.nio.IntBuffer;
You can’t perform that action at this time.