Skip to content

Instantly share code, notes, and snippets.

View joewalnes's full-sized avatar

Joe Walnes joewalnes

View GitHub Profile
@joewalnes
joewalnes / .block
Last active January 1, 2017 19:49 — forked from mbostock/.block
Streamgraph
license: gpl-3.0
https://www.sparkfun.com/products/8688
http://bildr.org/2011/06/temt6000_arduino/
http://playground.arduino.cc/Interfacing/LinuxTTY
http://websocketd.com/
http://smoothiecharts.org/
-- sensor
@joewalnes
joewalnes / simple-http-server.kt
Created November 20, 2017 18:58
Minimal embedded HTTP server in Kotlin using Java built in HttpServer
import com.sun.net.httpserver.HttpServer
import java.io.PrintWriter
import java.net.InetSocketAddress
/**
* Minimal embedded HTTP server in Kotlin using Java built in HttpServer
*/
fun main(args: Array<String>) {
HttpServer.create(InetSocketAddress(8080), 0).apply {
@joewalnes
joewalnes / jar-launcher.md
Last active December 10, 2023 11:58
Make a single file Java jar launcher

This is a little trick to turn an executable Java jar.

It works on all unixy like systems including Linux, MacOS, Cygwin, and Windows Linux subsystem.

Step 1 Start with an all-in-one jar (with entry point and all deps within)

$ ls 
hello.jar