Skip to content

Instantly share code, notes, and snippets.

View zglozman's full-sized avatar

Zeev Glozman zglozman

  • SnkeOS
  • Gainesville, FL
View GitHub Profile
@zglozman
zglozman / converts from crt to PFX with private key
Created December 15, 2015 13:44
converts from crt to PFX with private key
openssl pkcs12 -export -in f02d7642411fb278.crt -inkey beameio.key -out mycert.pfx
#!/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)
cat unused_subnets | while read subnet;do echo $subnet; aws ec2 delete-subnet --subnet-id $subnet; done
#!/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)
#!/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)
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;
}

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:

@zglozman
zglozman / gist:13f9cf4ae10991775ca0266969062385
Created December 7, 2017 18:58
Extract Public key from a certificate
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
locate x509.pem | grep x509| while read f; do echo $f; openssl x509 -in "$f" -text | grep After;done
@zglozman
zglozman / gist:2be9017e3f700b4fc2e7cc5bc7a9e2fd
Created November 23, 2018 15:39 — forked from ewoutkramer/gist:a1f19cf5bf00a42cd53d
My notes on Medical Devices in FHIR

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)