Skip to content

Instantly share code, notes, and snippets.

Jens Kristian Villadsen jkiddo

Block or report user

Report or block jkiddo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jkiddo
jkiddo / clean_code.md
Created Sep 3, 2019 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin
View clean_code.md

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@jkiddo
jkiddo / igpub maven
Created Jan 21, 2019
Rough initial maven file including all dependencies for igPub
View igpub maven
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.hl7.fhir.igtools</groupId>
<artifactId>org.hl7.fhir.igtools</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
View layers.md

Protokol- og model-lag for læsning/skrivning af information i HL7 modellerne CDA og FHIR:

Eksemplet her viser antallet af lag for at kunne læse/skrive ansvarlig enhed for en måling (observation) i et sæt af målinger. Sikkerhed er ikke taget med, da antallet af ekstra lag er ens for begge tilgange. Det forudsættes, at CDA dokumentet hentes over IHE XDS. Det forudsættes for begge at ID'et er kendt i forvejen.

FHIR

HTTP -> Json (HL7 FHIR) -> Bundle -> Resource -> Observation -> Performer

IHE XDS + CDA

HTTP -> SOAP + MTOM/XOP -> ebXML -> XML (HL7 CDA) -> ClinicalDocument -> component -> structuredBody -> component -> section -> entry -> act -> entryRelationship -> organizer -> participant -> participantRole -> scopingEntity

View wifi
#!/bin/bash
# Sagemcom Fast 3890 script for enabling/disabling Wifi
user="admin"
password="somePassword"
ssid="MySSID"
POSITIONAL=()
while [[ $# -gt 0 ]]
do
View centos.docker.container.host.fix.md

CentOS 7 fix for letting containers reach other containers on the same host:

From https://github.com/moby/moby/issues/16137#issuecomment-271615192

nmcli connection modify docker0 connection.zone trusted
systemctl stop NetworkManager.service
firewall-cmd --permanent --zone=trusted --change-interface=docker0
systemctl start NetworkManager.service
nmcli connection modify docker0 connection.zone trusted
View python web server
docker run -it --rm --name python-web -p 8000:8000 -v "$PWD":/usr/src/myapp -w /usr/src/myapp python:3 python -m http.server
@jkiddo
jkiddo / get_oracle_jdk_linux_x64.sh
Last active Mar 15, 2018 — forked from n0ts/get_oracle_jdk_linux_x64.sh
Get latest Oracle JDK package bash shell script
View get_oracle_jdk_linux_x64.sh
#!/bin/bash
# From: https://gist.github.com/n0ts/40dd9bd45578556f93e7 with suggested corrections
# You must accept the Oracle Binary Code License
# http://www.oracle.com/technetwork/java/javase/terms/license/index.html
# usage: get_jdk.sh <jdk_version> <ext>
# jdk_version: 8(default) or 9
# ext: rpm or tar.gz
View MM
Are you somewhat tech-related?
Have you ever heard of versioning systems?
Do you happen to find documents attached to mails in your inbox?
@jkiddo
jkiddo / FHIR.Subscription.md
Last active Nov 15, 2017
FHIR Subscription resource 'stuff-worth-talking-about'
View FHIR.Subscription.md
  • Returing all resources matching criteria upon creation of a subscription
    • Current situation is that the client is supposed to know the full state up front. If any change occurs between the client trying to figure out what the full state is and creating the subscription, that state change is lost. This is fixed by letting the server evaluate the criteria once the subscription is created - and then acting upon it.
  • Resources leaving the criteria
    • When resources leaves the criteria the client is not notified. This makes it pretty hard to base an implementation around a more event based approach where the server is supposed to notify the client about any changes that may occur. As long as resources leaving the criteria set is not part of the notifications clients will become stale pretty quickly.
  • Order and use of ETag for updates
    • The order of the updates is not described. If ETags are used by the notifying server, the client is able to detect if an update has gone missing one way or another. The u
You can’t perform that action at this time.