Skip to content

Instantly share code, notes, and snippets.

@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
// Using the Jenkins Groovy Post build plugin to execute the following after every build
// https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Postbuild+Plugin
// It would be nice not to have to specify these here... the repo name should be available within the hudson
// api somehow, but I didn't know how to get it. The access token should maybe be saved in a config file, and
// read in at runtime?
GITHUB_REPO_NAME = 'myusername/myreponame'
GITHUB_ACCESS_TOKEN = 'my_github_api_v3_access_token'