Skip to content

Instantly share code, notes, and snippets.

View mirkosertic's full-sized avatar

Mirko Sertic mirkosertic

View GitHub Profile
@mirkosertic
mirkosertic / module.wat
Created November 7, 2018 18:11
WebAssembly Exception Handling Textual Representation Example
(module $mod
(type $t0 (func (result i32)))
(memory $mem0 512 512)
(except $except i32)
(func $testFunction (type $t0) (result i32)
(try $tr
(throw $except (i32.const 42))
(return (i32.const 1))
(catch
(return (i32.const 3))
@mirkosertic
mirkosertic / gist:7c1a0b8a98db90982b995219c26750fa
Created November 23, 2017 11:24
WebAssembly call_indirect example
(module
(type $_type (func (param f32) (param f32) (result f32))) ;; we need a signature for the indirect call
(memory 256 256)
(table 128 anyfunc) ;; Table with function pointers
(elem (i32.const 0) $div) ;; function pointer with index 0 points to $div function
(func $div (param $p1 f32) (param $p2 f32) (result f32)
(f32.div
(get_local $p1)
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<annotationProcessors>
<annotationProcessor>org.checkerframework.checker.nullness.NullnessChecker</annotationProcessor>
</annotationProcessors>
import org.junit.Test;
import javax.annotation.Nonnull;
public class JSR308Test {
public class JSR308 {
private final String value;
import org.junit.Test;
import javax.validation.constraints.NotNull;
public class Lombok303Test {
public class Lombok303 {
private final String value;
import lombok.NonNull;
import org.junit.Test;
public class LombokNativeTest {
public class LombokNative {
private final String value;
public LombokNative(@NonNull String value) {
@mirkosertic
mirkosertic / gist:82cfa5e6e36cf9f5cc638d31a5a1bc2e
Created November 26, 2016 13:47
Remove Maven primary artifact
<plugin>
<groupId>org.codehaus.groovy.maven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>remove-primary-artefact</id>
<phase>package</phase>
<goals>
<goal>execute</goal>
@mirkosertic
mirkosertic / gist:8e57306bad5bc1f3e593062e006f1675
Created November 26, 2016 13:44
Example Maven RPM Plugin Configuration
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>attached-rpm</goal>
</goals>
<phase>package</phase>
</execution>