Skip to content

Instantly share code, notes, and snippets.

Avatar

Zeev Glozman zglozman

View GitHub Profile
View gist:2be9017e3f700b4fc2e7cc5bc7a9e2fd

Medical Device Workflows in FHIR

Medical device workflow are rich and complex. This design attempts to factor the domain into a minimal set of components that can be combined to produce useful systems. It's self-consciously naïve, but it should serve as a seed for discussion.

A few assumptions and a sketch

  • Any device can be online all the time, and can act as a FHIR server -- possible all on its own, or possibly with the help of a proxy/manager/facade component that "fronts for" the device. (Communication between the device and its manager occurs using any mechanism necessary; but the components below be useful for such internal communication, too.)

(EK: The assumption that a device can act as a server, won't that preclude the use of our resources by less powerful devices? I'm just thinking about smaller worn devices, etc. Maybe just posting results somewhere is the max we can expect from them)

View gist:3c2e09a2675464f94218bad97cafbdf2
locate x509.pem | grep x509| while read f; do echo $f; openssl x509 -in "$f" -text | grep After;done
@zglozman
zglozman / gist:13f9cf4ae10991775ca0266969062385
Created Dec 7, 2017
Extract Public key from a certificate
View gist:13f9cf4ae10991775ca0266969062385
openssl s_client -connect www.facebook.com:443 -servername www.facebook.com -cipher ECDHE-ECDSA-AES128-GCM-SHA256 < /dev/null | ngs -e 'read().lines()["-----BEGIN CERTIFICATE-----"..."-----END CERTIFICATE-----"].join("\n").echo()' | openssl x509 -noout -text
@zglozman
zglozman / gist:b7c0ed0f183862c931e7c77595ba4c33
Created Apr 16, 2017
Script to mount jffs2 filesystem using mtd kernel modules
View gist:b7c0ed0f183862c931e7c77595ba4c33
if [[ $# -lt 2 ]]
then
echo "Usage: $0 FSNAME.JFFS2 MOUNTPOINT [ERASEBLOCK_SIZE]"
exit 1
fi
if [ "$(whoami)" != "root" ]
then
echo "$0 must be run as root!"
exit 1
View keybase.md

Keybase proof

I hereby claim:

  • I am zglozman on github.
  • I am zglozman (https://keybase.io/zglozman) on keybase.
  • I have a public key ASBT5O51pzLITn-25PJOx8kLuVNaJ7nDztO7ZWHu0GqytQo

To claim this, I am signing this object:

View getPublicKey.js
function getPublicKeyFromModulustoDer(n) {
var modulus = new Buffer(n, 'hex');
var header = new Buffer("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA", "base64");
var midheader = new Buffer("0203", "hex");
var exponent = new Buffer("010001", "hex");
var buffer = Buffer.concat([header, modulus, midheader, exponent]);
return buffer;
}
View check_beame_envs
#!/usr/bin/env bash
#readAndEchoData{
# echo -n "[$1] "; #}
set .
set -eu
queryEnv()
{
instanceData=$(/usr/bin/curl -s http://$1/instance)
softwareConf=$(/usr/bin/curl -s http://$1/software)
View check_beame_envs
#!/usr/bin/env bash
#readAndEchoData{
# echo -n "[$1] "; #}
set .
set -eu
queryEnv()
{
instanceData=$(/usr/bin/curl -s http://$1/instance)
softwareConf=$(/usr/bin/curl -s http://$1/software)
View delete all unsubnets
cat unused_subnets | while read subnet;do echo $subnet; aws ec2 delete-subnet --subnet-id $subnet; done
View aws-access-key-to-iam-name.sh
#!/bin/bash -e
#
# Pass this script an AWS access key ID and it will show you what IAM user
# has that key.
#
# Usage:
# aws-access-key-to-iam-name some_key_id
#
readonly PROGNAME=$(basename $0)