Skip to content

Instantly share code, notes, and snippets.

General

What is DiSARM?

DiSARM is the Disease Surveillance And Risk Monitoring platform. Find out more at disarm.io

Reloading and updating

  • DiSARM is designed to run offline in a robust way that protects your data.
  • In general, you can try reloading any page that looks like it's stuck loading (click the reload button on your browser). If you're editing a form, you may lose your entry unless you save first.
  • If DISARM is online, it will check to see if there's a new version available. If there is, it will download and update in the background, letting you know when it's ready. Sometimes (due to a slow connection or other issue), the update doesn't work.
  • If things get stuck on a desktop browser, you can try a "force reload", which is ctrl+shift+r on Windows (cmd+shift+ron Mac). This will try to re-download the required application files and start up again. Your data (except unsaved forms) will not be removed.
{
"pages": [
{
"elements": [
{
"type": "text",
"inputType": "number",
"isRequired": true,
"name": "number_sprayable",
"title": "How many sprayable structures in the household/homestead?",
{
"pages": [
{
"elements": [
{
"choices": [
{
"text": "Yes",
"value": "yes"
},
@onlyjsmith
onlyjsmith / pubsubcache.js
Created July 5, 2018 06:43
pubsub with cache!
// basic pubsub module with cache!
// enables us to start publishing to a channel,
// and for later subscribers to replay the messages
// stores max of 10 messages
// source: internet, undated
let topics = {};//sw: [{token: 1, func: () => {}}]}
let subUid = -1
let cache = {};//sw: ['args', 'args2']}
1 {
2 "$id": "http://example.com/example.json",
3 "type": "object",
4 "definitions": {},
5 "$schema": "http://json-schema.org/draft-07/schema#",
6 "properties": {
7 "_id": {
8 "$id": "/properties/_id",
9 "type": "string",
10 "title": "The _id Schema ",
const fs = require('fs')
const intersect = require('@turf/intersect')
const bounding_box = require('@turf/bbox')
const rbush = require('rbush')
const DEBUG = false
if (DEBUG) console.time('everything')
// Specify unique ID fields for outer and inner sets of data
{
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36",
"id": "ca59dc77-9c13-4968-be3d-8e849fb5f1c0",
"recorded_on": "2017-09-18T19:59:47.638Z",
"location": {
"coords": {
"accuracy": 100,
"longitude": 21.244202088121707,
"latitude": -18.027582610265743
},
@onlyjsmith
onlyjsmith / validate-vue-surveyjs.html
Last active May 29, 2017 08:16
validate-vue-surveyjs
<!DOCTYPE html>
<html>
<head>
<title>Welcome to Vue</title>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<link rel="stylesheet" href="http://getbootstrap.com/dist/css/bootstrap.css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js"></script>
<script type="text/javascript" src="http://cdn3.devexpress.com/jslib/15.1.5/js/dx.chartjs.js"></script>
@onlyjsmith
onlyjsmith / index.html
Last active May 29, 2017 08:03
Surveyjs Vue value changed hook
<!DOCTYPE html>
<html>
<head>
<title>Welcome to Vue</title>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<link rel="stylesheet" href="http://getbootstrap.com/dist/css/bootstrap.css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js"></script>
<script type="text/javascript" src="http://cdn3.devexpress.com/jslib/15.1.5/js/dx.chartjs.js"></script>
@onlyjsmith
onlyjsmith / karabiner.json
Created February 10, 2017 21:21
karabiner.json
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"name": "Default profile",
"selected": true,