Skip to content

Instantly share code, notes, and snippets.

View dermatologist's full-sized avatar
🔥
Playing with FHIR

Bell Eapen dermatologist

🔥
Playing with FHIR
View GitHub Profile
# setup vagrant
gem install vagrant
vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
mkdir my_vagrant_test
cd my_vagrant_test
vagrant init lucid32
vim Vagrantfile
vagrant up
vagrant ssh
@dermatologist
dermatologist / OSCAR eForm Template.html
Last active May 23, 2018 21:02
OSCAR eForm Template with useful functions
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OSCAR Test Form</title>
<!-- About this template
Created By: Bell Eapen, McMaster University.
Website: http://nuchange.ca
Date: 12 July, 2016
Instructions:
@dermatologist
dermatologist / FileUpload.cs
Created July 24, 2017 21:06
ASP.Net Core Upload Multiple Files , Zip and Save as a byte array in database
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using System.IO;
using System.IO.Compression;
namespace MyNameSpace
{
@dermatologist
dermatologist / docker-compose.yml
Last active October 6, 2017 02:12
docker-compose for deploying OpenClinica
version: '2'
services:
pgs:
image: postgres:9.4
restart: always
ports:
- 5432:5432
environment:
POSTGRES_DB: clinica
FROM java:8
# https://hub.docker.com/r/library/java/tags/
# Install maven
RUN apt-get update
RUN apt-get install -y maven
WORKDIR /code
# Prepare by downloading dependencies
@dermatologist
dermatologist / docker-compose.yml
Created December 28, 2017 15:47
Debugging OpenMRS module using docker
version: '2.1'
services:
db:
restart: "always"
image: mariadb:10
command: "mysqld --character-set-server=utf8 --collation-server=utf8_general_ci"
environment:
MYSQL_DATABASE: openmrs
MYSQL_ROOT_PASSWORD: Admin123
@dermatologist
dermatologist / Apache Tomcat 8 Start stop script init.d script
Created May 5, 2018 19:17 — forked from miglen/Apache Tomcat 8 Start stop script init.d script
Apache Tomcat init script (or startup/controll script). Works fine for version 7/8. Read the comments for release history. Feel free to modify, copy and give suggestions. (c) GNU General Public License
#!/bin/bash
#
# description: Apache Tomcat init script
# processname: tomcat
# chkconfig: 234 20 80
#
#
# Copyright (C) 2014 Miglen Evlogiev
#
# This program is free software: you can redistribute it and/or modify it under
package com.example.controllers.dashboard;
import org.springframework.security.jwt.Jwt;
import org.springframework.security.jwt.JwtHelper;
import org.springframework.security.jwt.crypto.sign.MacSigner;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@dermatologist
dermatologist / csvtomap.go
Created September 29, 2018 13:14 — forked from drernie/csvtomap.go
Golang Convert CSV Records to Dictionaries using Header Row as Keys
// CSVToMap takes a reader and returns an array of dictionaries, using the header row as the keys
func CSVToMap(reader io.Reader) []map[string]string {
r := csv.NewReader(reader)
rows := []map[string]string{}
var header []string
for {
record, err := r.Read()
if err == io.EOF {
break
}
@dermatologist
dermatologist / oscar.js
Last active October 4, 2018 14:54
Add name next to all input and select fields
var $input_fields = $("input, select");
$.each($input_fields, function() {
$(this).after('<span style="color:red;">' + $(this).prop("name") + '</span>');
$(this).show();
});