Skip to content

Instantly share code, notes, and snippets.

View sween's full-sized avatar
💭
Mostly Good Intentions

Ron Sweeney sween

💭
Mostly Good Intentions
View GitHub Profile
@sween
sween / get_access_token.js
Created April 28, 2021 15:22 — forked from ejdoh1/get_access_token.js
How to get an access_token from AWS Cognito using Axios
// Get AWS Congito access token using node-fetch and axios
const axios = require('axios');
const fetch = require('node-fetch');
const url = 'https://REPLACE_ME.auth.ap-southeast-2.amazoncognito.com/oauth2/token';
const clientId = 'REPLACE_ME';
const clientSecret = 'REPLACE_ME';
const body = `client_id=${clientId}&client_secret=${clientSecret}&grant_type=client_credentials`
// with node-fetch
@sween
sween / SMART-Sanbox-standalone-patient.md
Created March 9, 2021 16:17 — forked from hansenms/SMART-Sanbox-standalone-patient.md
SMART on FHIR Standalone launch (patient)

First get `/metadata'

GET https://launch.smarthealthit.org/v/r3/sim/eyJrIjoiMSIsImIiOiJiMWYwMzY1ZC1mNDA1LTQ1YzAtOGNiZC1kYTU2NTE4ZTc1MDQifQ/fhir/metadata

eyJrIjoiMSIsImIiOiJiMWYwMzY1ZC1mNDA1LTQ1YzAtOGNiZC1kYTU2NTE4ZTc1MDQifQ is a JWT with the following header:

{
@sween
sween / install-docker.md
Created December 30, 2020 15:12 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start