Skip to content

Instantly share code, notes, and snippets.

View Narigo's full-sized avatar

Joern Bernhardt Narigo

View GitHub Profile
final Context ctx = vertx.currentContext();
otherLibrary.doSomethingAsync("foo", new Runnable() {
public void run() {
// This will be executed on the other library's thread so we need to make sure the result is done on the correct context
ctx.runOnContext(new Handler<Void>() {
public void handle(Void v) {
// Now we are on the right context - use the Vert.x API as normal
request.response().end("blah");
}
@tkshill
tkshill / wordle.elm
Created March 8, 2022 20:56
Wordle clone in Elm
module Main exposing (Model, Msg(..), init, main, subscriptions, update, view)
import Browser
import Debug exposing (log)
import Html exposing (Html, button, div, input, span, text)
import Html.Attributes exposing (class, placeholder, style, value)
import Html.Events exposing (onClick, onInput)
import List.Extra as Liste
import Task
import Time