Skip to content

Instantly share code, notes, and snippets.

@graemerocher
graemerocher / App.java
Created May 31, 2021 18:47
Micronaut JBang Example
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS io.micronaut:micronaut-bom:2.5.4@pom
//DEPS io.micronaut:micronaut-http-server-netty
//DEPS io.micronaut:micronaut-inject-java
//DEPS org.slf4j:slf4j-simple
package app;
import io.micronaut.http.annotation.*;
import io.micronaut.runtime.Micronaut;
@dexX7
dexX7 / many-to-many.md
Last active May 28, 2020 07:46
Omni Lite

Multi-command transactions

A new transaction structure allows to include multiple commands into one transaction. This is done by including a list of commands in the transaction payload. Each command is executed one by one and may be invalid without invalidating the other commands.

The payload structure may look like this:

[transaction marker] [number of commands] [command 1] ( [command 2] [...] )
// You will need the VFS plugin
buildscript {
repositories {
jcenter()
}
dependencies {
// Set your
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:0.7.0'
classpath 'org.ysb33r.gradle:vfs-gradle-plugin:0.5'
@ItGumby
ItGumby / build.gradle
Last active October 11, 2017 07:28 — forked from ysb33r/gist:0c534d165863628a07cc
gradle build file for presentations from asciidoctor and deck.js
// You will need the VFS plugin
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0'
classpath 'org.ysb33r.gradle:vfs-gradle-plugin:0.5'
classpath 'commons-httpclient:commons-httpclient:3.1'
@H1D
H1D / gist:3764514
Created September 21, 2012 23:33
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<link rel="stylesheet" href="iui.css" type="text/css" />
<link rel="stylesheet" href="t/default/default-theme.css" type="text/css"/>
<script type="application/x-javascript" src="iui.js"></script>
<style type="text/css">
@torgeir
torgeir / ioc.js
Created September 11, 2012 11:50
Poor mans JavaScript dependency injection
(function () {
(typeof window == 'undefined' ? global : window).ioc = ioc;
var singletons = {};
function ioc (Constructor, previous) {
if ((previous || (previous = [])).indexOf(Constructor) != -1) {
throw new Error('circular!');