Skip to content

Instantly share code, notes, and snippets.

View mtuchi's full-sized avatar
🦣
console.log('o_0')

Emmanuel Evance mtuchi

🦣
console.log('o_0')
View GitHub Profile
@mtuchi
mtuchi / homework.md
Created March 27, 2023 07:12
Sample homework submission
get("users");
fn((state) => {
const globalOrgsUnit = [
{
id: "g8upMTyEZGZ",
city: "Gwenborough",
},
];
@mtuchi
mtuchi / day1-hw.md
Last active February 5, 2024 12:56
Day 1 homework

Challenge

Your organization is collecting patient data in a custom EMR application.

Your government partner wants you to start sending newly registered patient records from your EMR to its national DHIS2 system on a weekly basis.

You’ve been asked to design a workflow to:

  • extract data from your app (which has a REST API that returns data in JSON)
  • map the data elements to the DHIS2 data model, and
  • sync patient records as “Tracked Entity Instance” records to DHIS2
{
"trackedEntityType": "nEenWmSyUEp",
"orgUnit": "g8upMTyEZGZ",
"attributes": [
{
"attribute": "cejWyOfXge6",
"value": "Male"
},
{
"attribute": "lZGmxYbs97q",
@mtuchi
mtuchi / usersSampleData.json
Created January 5, 2023 11:25
Sample data for users
[
{
"id": 1,
"name": "Leanne Graham",
"username": "Bret",
"email": "[email protected]",
"address": {
"street": "Kulas Light",
"suite": "Apt. 556",
"city": "Gwenborough",
@mtuchi
mtuchi / job-writing.md
Last active January 30, 2023 11:08
Job writing Training Homework

Challenge

Your organization is collecting patient data in a custom EMR application.

Your government partner wants you to start sending newly registered patient records from your EMR to its national DHIS2 system on a weekly basis.

You’ve been asked to design a workflow to:

  • extract data from your app (which has a REST API that returns data in JSON)
  • map the data elements to the DHIS2 data model, and
  • sync patient records as “Tracked Entity Instance” records to DHIS2
at java.util.ArrayList.forEach(ArrayList.java:1257) [?:1.8.0_201]
at org.elasticsearch.xpack.monitoring.exporter.local.LocalExporter.setupIfElectedMaster(LocalExporter.java:392) [x-pack-5.6.16.jar:5.6.16]
at org.elasticsearch.xpack.monitoring.exporter.local.LocalExporter.resolveBulk(LocalExporter.java:214) [x-pack-5.6.16.jar:5.6.16]
at org.elasticsearch.xpack.monitoring.exporter.local.LocalExporter.openBulk(LocalExporter.java:172) [x-pack-5.6.16.jar:5.6.16]
at org.elasticsearch.xpack.monitoring.exporter.local.LocalExporter.openBulk(LocalExporter.java:98) [x-pack-5.6.16.jar:5.6.16]
at org.elasticsearch.xpack.monitoring.exporter.Exporters.openBulk(Exporters.java:124) [x-pack-5.6.16.jar:5.6.16]
at org.elasticsearch.xpack.monitoring.exporter.Exporters.export(Exporters.java:195) [x-pack-5.6.16.jar:5.6.16]
at org.elasticsearch.xpack.monitoring.MonitoringService$MonitoringExecution$1.doRun(MonitoringService.java:205) [x-pack-5.6.16.jar:5.6.16]
@mtuchi
mtuchi / apache-nginx-ftp
Created July 24, 2019 18:10 — forked from solancer/apache-nginx-ftp
Correct permissions for /var/www/html
// Adding current user to www-data
sudo adduser $USER www-data
//change ownership to user:www-data and
sudo chown $USER:www-data -R /var/www/html
sudo chmod u=rwX,g=srX,o=rX -R /var/www/html
// change file permissions of existing files and folders to 755/644
sudo find /var/www/html -type d -exec chmod g=rwxs "{}" \;
@mtuchi
mtuchi / Procfile
Created May 3, 2019 11:53 — forked from sdrew/Procfile
Laravel configs for Heroku/Dokku
web: vendor/bin/heroku-php-apache2 public/
➜ platform git:(master) ✗ docker-compose up
platform_mysql_1 is up-to-date
platform_dashboard_1 is up-to-date
Starting platform_mongo_1 ... done
Starting platform_keycloak_1 ...
Starting platform_keycloak_1 ... done
Starting platform_orion_1 ... done
platform_api-server_1 is up-to-date
Attaching to platform_mysql_1, platform_dashboard_1, platform_mongo_1, platform_socials_1, platform_keycloak_1, platform_orion_1, platform_api-server_1
mongo_1 | 2019-04-30T09:23:06.768+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=mongo