Skip to content

Instantly share code, notes, and snippets.

@mestachs
mestachs / cases.html
Last active December 4, 2026 11:47
odk-cli test cases report (BLSQ/odk-cli 978261b)
<!DOCTYPE html><meta charset='utf-8'><title>odk_cli test cases</title><style>
body{font:14px system-ui,sans-serif;margin:2em;max-width:70em}summary{cursor:pointer;padding:2px 0}
details details{margin:.5em 0}details>div{margin:0 0 1em 1.5em}h3{font-size:13px;margin:1em 0 .3em}
p.note{background:#fff8c5;border-left:4px solid #d4a72c;padding:6px 10px}
p.filter button{margin-right:.5em;padding:3px 10px;border:1px solid #ccc;border-radius:12px;background:#fff;cursor:pointer}
p.filter button.on{background:#24292f;color:#fff;border-color:#24292f}
h3.class{font-size:1.1em;margin-top:1.5em}b.saved{color:#1a7f37;font-weight:600}b.refused{color:#bc4c00;font-weight:600}
table{border-collapse:collapse;margin-bottom:.5em}td,th{border:1px solid #ddd;padding:2px 6px;text-align:left;font-size:13px}th{background:#f4f4f4}
pre{background:#f6f8fa;padding:8px;overflow:auto;margin:0}.problem{background:#fee;padding:6px;white-space:pre-wrap}
</style><h1>odk_cli test cases</h1><p>Each case&#x27;s result on the JVM and the binary, in
@mestachs
mestachs / params.json
Last active July 7, 2021 19:33
demo-checkl
{
"sourceDhis2": "https://play.dhis2.org/",
"elasticBeanstalkApp": "sandbox",
"startVersion": "2.32",
"endVersion": "2.34",
"hide": false
}
{
"payment_rules": {
"hospital_payment": {
"name": "Hospital payment",
"formulas": {
"quality_score": {
"de_id": "kHiZFDjZesb",
"expression": "round( avg(structure_and_management_score, process_of_care_score) ,2)",
"frequency": "quarterly"
},
Orgunits*
type -> OrgunitsFetching
tick -> Periods
OrgunitsFetching
type -> Orgunits
Periods
tick -> ReferencePeriods
@mestachs
mestachs / problem.json
Created January 8, 2018 15:02
problem.json
{
"act1_weight_level1_for_1_and_2016q1": "6",
"act1_achieved_for_1_and_2016q1": "33",
"act1_target_for_1_and_2016q1": "33",
"act1_active_for_1_and_2016q1": "1",
"act1_cap_level1_for_1_and_2016q1": "125",
"act1_regional_bonus_level1_for_1_and_2016q1": "121235",
"act1_orgunit_id_for_1_and_2016q1": "1",
"act2_weight_level1_for_1_and_2016q1": "5",
"act2_achieved_for_1_and_2016q1": "80",
@mestachs
mestachs / punch_card.rb
Created January 26, 2017 19:33
punch card
require 'histogram/array'
require 'active_support'
require 'active_support/core_ext'
require 'active_support/core_ext/numeric'
timestamps = (1..355).map do |t|
[
Time.now + (t * 1).days + 3.hours + rand(60).minutes + rand(16).seconds,
Time.now + (t * 1).days - 1.hours + rand(60).minutes + rand(16).seconds
]
@mestachs
mestachs / crypto-wrong-answers.md
Created June 19, 2016 14:42 — forked from paragonie-scott/crypto-wrong-answers.md
An Open Letter to Developers Everywhere (About Cryptography)
library(ggmap)
library(readr)
data <- read_csv("./input/train.csv")
locations = c(left = -122.5222,
bottom = 37.7073,
right = -122.3481,
top = 37.8381)
@mestachs
mestachs / Vagrantfile
Created July 11, 2013 09:13
Vagrantfile 1.2
require 'fileutils'
# https://gist.github.com/3798773 speed up vagrant for debian
def local_cache(box_name)
cache_dir = File.join(File.dirname(__FILE__), 'cache', 'apt', box_name)
partial_dir = File.join(cache_dir, 'partial')
FileUtils.mkdir_p(partial_dir) unless File.exists? partial_dir
cache_dir
end