Skip to content

Instantly share code, notes, and snippets.

Coding (and hiring! reach out)

Erik Schultink eschultink

Coding (and hiring! reach out)
View GitHub Profile
eschultink / .gitconfig
Created September 25, 2018 23:06
Alias section of my .gitconfig
View .gitconfig
# find when commits were merged
# git find-merge <SHA-1> // when merged to current branch
# git find-merge <SHA-1> master // when merged to master
find-merge = "!sh -c 'commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2'"
show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge'"
eschultink /
Last active November 14, 2017 23:53
Servlet to support Automatic Certificate Management Environment (ACME) challenges on Google App Engine, as needed for Let's Encrypt. see:
package co.worklytics.acme;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
eschultink /
Created April 1, 2015 23:38
Dagger for a Servlet Example
import dagger.ObjectGraph;
public abstract class BaseServlet extends HttpServlet {
private ObjectGraph graph;
* inits the Servlet with the object graph from Dagger
* if you override this, be sure your implementation calls that of this super class
* @param config