Skip to content

Instantly share code, notes, and snippets.

View lony's full-sized avatar

Goetz Epperlein lony

View GitHub Profile
@amr
amr / tmpdir.scala
Created October 2, 2014 10:04
Create temporary directory with the JVM (Scala here)
def createTempDir(tmpName: String): String = {
val tmpDir = Paths.get(System.getProperty("java.io.tmpdir"))
val name: Path = tmpDir.getFileSystem.getPath(tmpName)
if (name.getParent != null) throw new IllegalArgumentException("Invalid prefix or suffix")
tmpDir.resolve(name).toString
}
@fabito
fabito / jenkins_nginx_ci.template.json
Created November 9, 2012 22:47
AWS Cloudformation template which creates a server based on Amazon Linux and automatically installs jenkins with nginx (working as a reverse proxy).
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation template to deploy jenkins/nginx.",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type" : "String",