Skip to content

Instantly share code, notes, and snippets.

emersonf / learn-more-about-mental-health.html
Created March 14, 2017 08:21
Aware app content example
View learn-more-about-mental-health.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<html lang="en">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Learn More About Mental Health</title>
<h1>Mental Health</h1>
<h2>What Is Mental Health?</h2>
emersonf / PAM.json
Created February 23, 2017 08:25
PAM score mapping
View PAM.json
"prompt":"Select the photo that best captures how you feel right now:",
"identifier":"PAM Summary Identifier",
"text":"Thank you for participating in PAM"
emersonf / output.json
Created July 28, 2015 20:23
minute-resolution intraday step data output by Fitbit shim
View output.json
"effective_time_frame": {
"time_interval": {
"start_date_time": "2014-09-10T00:47:00.000Z",
"duration": {
"value": 1,
"unit": "min"
View Ida's Header Schema Draft.json
"header": {
"id": "123e4567-e89b-12d3-a456-426655440000",
"creation_time": "2013-02-05T07:25:00Z",
"schema": {
"namespace": "omh",
"name": "calories_burned",
"version": "1.1.RC1"
"code-url": //new suggestion -- to pull out all data indexed with a SNOMED code?
"acquisition_provenance": {
emersonf /
Last active August 29, 2015 14:03
Jackson Joda DateTime serialisation from Spring Boot breaks with DelegatingWebMvcConfiguration
public class Application {
public static void main(String[] args) {
new SpringApplicationBuilder(Application.class).run(args);
emersonf /
Created June 17, 2014 06:39
A controller showing unexpected behaviour when URI template variables have regex restrictions.
package internal.sandbox.configuration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
emersonf / build.script.groovy
Last active August 29, 2015 14:02
A Gradle build script for a Spring Boot application.
View build.script.groovy
apply plugin: 'java'
apply plugin: 'maven' // used for deploying artifacts to Maven repositories
apply plugin: 'spring-boot'
group = 'internal'
version = '1.0-SNAPSHOT'
description = ""
sourceCompatibility = 1.7
targetCompatibility = 1.7
emersonf /
Created May 2, 2014 15:20
A controller that mixes synchronous and asynchronous requests from a single endpoint.
package tv.nativ.mio.publish.common.controller;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
emersonf /
Last active April 17, 2023 16:21
A Bash script to compute ETag values for S3 multipart uploads on OS X.
if [ $# -ne 2 ]; then
echo "Usage: $0 file partSizeInMb";
exit 0;
if [ ! -f "$file" ]; then
emersonf / gist:4989430
Last active December 13, 2015 23:09
session access in Gatling
View gist:4989430
import com.excilys.ebi.gatling.core.Predef._
class Foo(val a:Int, val b:Int)
class TestSimulation extends Simulation {
val scn = scenario("testScenario")
.exec(session => session.setAttribute("foo", new Foo(1, 2)))
.exec(session => {