Skip to content

Instantly share code, notes, and snippets.

View milankarunarathne's full-sized avatar
:octocat:
Coding

Milan Karunarathne milankarunarathne

:octocat:
Coding
View GitHub Profile
@milankarunarathne
milankarunarathne / git_extract_commits.sh
Last active September 9, 2015 18:14 — forked from xinan/git_extract_commits.sh
This is a simple shell script to extract commits by a specified author in a git repository and format them as numbered patches. It is useful for GSoC code submission.
if ! [[ $# -eq 1 || $# -eq 2 || $# -eq 4 ]]; then
echo "Usage: $0 <author> [<start_date> <end_date>] [output_dir]"
echo "Example: $0 xinan@me.com 2015-05-25 2015-08-21 ./patches"
exit
fi
author=$1
if [ $# -gt 3 ]; then
output_dir=$4
@milankarunarathne
milankarunarathne / image-study-fetch.js
Last active August 29, 2015 14:23 — forked from anonymous/gist:2d284ee3395f00a592f8
In a Diagnostic Report, fetch `imageStudy` data from third party application and display them.
angular.module('radiologyApp',[])
.controller('radiologyController',function($scope,$http,$window){
$http({method:'GET',
headers: {'Accept': 'application/json'},
url: 'http://fhir.hackathon.siim.org/fhir/DiagnosticReport?subject=Patient/siimsally'
}).
success(function(data,status,headers,config){
$scope.patientstudies = data
$scope.count= data['totalResults']