Skip to content

Instantly share code, notes, and snippets.

View mygzi's full-sized avatar

Yuval Koren mygzi

  • San Francisco, CA
View GitHub Profile
@mygzi
mygzi / epic_on_fhir_auth.py
Created August 10, 2022 22:06
Epic on FHIR backend system (sandbox) authentication sample
from datetime import datetime
from datetime import timezone
from datetime import timedelta
import requests
import jwt
import os
import uuid
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.serialization import load_pem_private_key
from cryptography.x509 import load_pem_x509_certificate
@mygzi
mygzi / pkce
Created May 20, 2019 23:17
Generate PKCE (RFC 7636) secret and challenge on the command line
CODE_VERIFIER=`head -c 32 /dev/urandom | base64 | sed -e "s,=,,g" -e "s,+,-,g" -e "s,/,_,g"`
CODE_CHALLENGE=`echo -n $CODE_VERIFIER | openssl dgst -sha256 -binary | base64 | sed -e "s,=,,g" -e "s,+,-,g" -e "s,/,_,g"`
@mygzi
mygzi / .block
Created September 10, 2016 03:23 — forked from mbostock/.block
Epicyclic Gearing
license: gpl-3.0
@mygzi
mygzi / app.css
Last active October 7, 2015 22:01
Performant Angular Chat
[ng-cloak]
{
display: none !important;
}
.flex {
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox; /* TWEENER - IE 10 */
display: -webkit-flex;