Skip to content

Instantly share code, notes, and snippets.

View liwoo's full-sized avatar
🎯
Focusing

Jeremiah Chienda liwoo

🎯
Focusing
View GitHub Profile
#!/usr/bin/env node
'use strict'
const express = require('express')
const medUtils = require('openhim-mediator-utils')
const winston = require('winston')
const axios = require('axios');
const utils = require('./utils')
@liwoo
liwoo / rooms.query
Created September 13, 2018 16:24
Example Lighhouse Implementations
roomsByCategory(categoryId: 5){
id
name
category
lodging {
id
name
}
images(last: 2){
url
"use strict";
const server = require("../server/server");
const User = server.models.Client;
const Role = server.models.Role;
const RoleMapping = server.models.RoleMapping;
module.exports = async (users) => {

User Stories for DDE Dashboard

Administrator Login

I must be able to login to the Dashboard as an Administrator

Visualizations

As an Administrator...

I must be able to visualize all Health Facilities with DDE on a Map of Malawi

I must be able to see Health Facilities with DDE that can be reached remotely as GREEN on the map

Integration Tests for the Master Facility Register API

Authentication Test Suite

Login Test

> It... 
Allows an Administrator Client to Login successfully into the Master Facility Register

> It...
Displays appropriate error message when Unauthenticated Client tries to login
mutation {
createCountry(data: {
name: "Malawi",
code: "MW",
description: "Officially the Republic of Malawi, is a landlocked country in southeast Africa that was formerly known as Nyasaland. It is bordered by Zambia to the northwest, Tanzania to the northeast, and Mozambique on the east, south and west. Malawi is over 118,000 km2 (45,560 sq mi) with an estimated population of 18,091,575 (July 2016 est.). Its capital is Lilongwe, which is also Malawi's largest city; the second largest is Blantyre, the third is Mzuzu and the fourth largest is its old capital Zomba. The name Malawi comes from the Maravi, an old name of the Nyanja people that inhabit the area. The country is also nicknamed 'The Warm Heart of Africa'.Malawi is among the smallest countries in Africa. Lake Malawi takes up about a third of Malawi's area."
images: {
create: [
{
url: "https://www.enchantingtravels.com/wp-content/uploads/2017/05/Enchanting-Travels-Malaw
/*Write a function called that takes a string of parentheses, and determines if the order of the parentheses is valid. The function should return true if the string is valid, and false if it's invalid.
Examples
"()" => true
")(()))" => false
"(" => false
"(())((()())())" => true
Constraints
0 <= input.length <= 100
@liwoo
liwoo / MflDownload.js
Created November 29, 2017 06:47
React Component that forces browser download contents returned from an API call in a specified file format
import React, { Component } from "react";
import { connect } from "react-redux";
import downloadFacilities from "../actions/download-facilities";
import fileDownload from "js-file-download";
class MflDownload extends Component {
constructor(props) {
super(props);
}