Skip to content

Instantly share code, notes, and snippets.

View ivarref's full-sized avatar

Ivar Refsdal ivarref

View GitHub Profile
package no.nsd.programvareutvikling;
import org.apache.commons.fileupload.FileItemIterator;
import org.apache.commons.fileupload.FileItemStream;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.io.IOUtils;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.AbstractHandler;
@ivarref
ivarref / Dockerfile
Last active September 7, 2016 11:45
Allow Dockerfiles to be executed with the help of PHP
#!/usr/bin/php
#<?php echo "\010"; system("docker build --tag=meh .", $retval); if ($retval==0 && $argc == 2 && $argv[1] == "run") { system("docker run meh", $retval); } exit($retval); /*
# Pre-build: $ chmod +x ./Dockerfile
# To build: $ ./Dockerfile
# To build and run: $ ./Dockerfile run
FROM node:6