Skip to content

Instantly share code, notes, and snippets.

Avatar

Johannes Brodwall jhannes

View GitHub Profile
@jhannes
jhannes / package.json
Last active Aug 29, 2015
Promises you can trust
View package.json
{
"name": "promises",
"scripts": {
"test": "node node_modules/mocha/bin/mocha --watch --growl"
},
"devDependencies": {
"chai": "^1.10.0",
"mocha": "^2.0.1"
},
"dependencies": {
@jhannes
jhannes / AnnotationScanner.java
Created Jan 16, 2015
Jetty 9 embedded Servlet 3.0 annotations without war file
View AnnotationScanner.java
public class AnnotationScanner {
protected void scanForAnnotations(final String javaPackage, WebAppContext webapp) throws Exception {
Set<AnnotationParser.Handler> handlers = new HashSet<>();
handlers.add(new WebServletAnnotationHandler(webapp));
handlers.add(new WebFilterAnnotationHandler(webapp));
handlers.add(new WebListenerAnnotationHandler(webapp));
AnnotationParser annotationParser = new AnnotationParser();
for (URL url : ((URLClassLoader) getClass().getClassLoader()).getURLs()) {
@jhannes
jhannes / GoogleForms-to-Trello.gs
Last active Aug 27, 2019
Google Forms to Trello
View GoogleForms-to-Trello.gs
var authentication = "key=a...&token=9...";
var idBoard = "592....";
var inboxList = "592...";
var updatedLabel = "592....";
function getField(itemResponses, fieldName) {
var titles = [];
for (var i in itemResponses) {
if (itemResponses[i].getItem().getTitle() === fieldName && itemResponses[i].getResponse().length > 0) {
You can’t perform that action at this time.