Skip to content

Instantly share code, notes, and snippets.

@davidkeen
davidkeen / le-renew-webroot
Last active March 4, 2016 14:28 — forked from thisismitch/le-renew-webroot
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
#!/bin/bash
web_service='nginx'
config_file=${1:-/usr/local/etc/le-renew-webroot.ini}
le_path='/opt/letsencrypt'
exp_limit=30;
function log {
echo [$(date -u)] $1
@davidkeen
davidkeen / env
Last active October 17, 2018 13:16
A systemd unit file for Play Framework
ADDRESS=127.0.0.1
PORT=9000
APPLY_EVOLUTIONS=true
APPLICATION_SECRET=my_secret
@davidkeen
davidkeen / SingleRevisionClassLoaderEvolutionsReader.scala
Created January 4, 2018 13:10
A Play Framework Evolutions reader that reads a single revision from the class path.
import play.api.db.evolutions.{ClassLoaderEvolutionsReader, Evolution}
import play.api.libs.Collections
/***
* Evolutions reader that reads a single revision from the class path.
*
* @param revision the revision number to load
* @param prefix A prefix that gets added to the resource file names
*/
class SingleRevisionClassLoaderEvolutionsReader(val revision: Int, val prefix: String) extends ClassLoaderEvolutionsReader(prefix = prefix) {