Skip to content

Instantly share code, notes, and snippets.

View damianesteban's full-sized avatar
🎯
Focusing

Damian Esteban damianesteban

🎯
Focusing
View GitHub Profile
@damianesteban
damianesteban / LiveDataViewModel.kt
Created November 19, 2020 20:38
LiveDataViewModel
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@damianesteban
damianesteban / LiveDataActivity.kt
Created November 19, 2020 20:37
LiveDataActivity
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@damianesteban
damianesteban / DefaultDataSource.kt
Created November 19, 2020 20:36
DefaultDataSource
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software

The time is always right to do what is right. ~Martin Luther King Jr.

Summary (all you need to know)

@damianesteban
damianesteban / cloudSettings
Last active January 6, 2020 22:27
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-01-06T22:27:19.874Z","extensionVersion":"v3.4.3"}
@damianesteban
damianesteban / userdata.ts
Created September 3, 2019 18:26
Updated userdata model
export interface UserData {
videoSessionId: string;
patient: {
firstName: string;
lastName: string;
email: string;
};
provider: {
firstName: string;
lastName: string;
import * as auth0 from 'auth0';
import axios from 'axios';
// axios client example
const axiosClient = axios.create({
baseURL: 'https://APP_DOMAIN',
timeout: 5000,
maxRedirects: 2,
withCredentials: true,
});
@damianesteban
damianesteban / cognitoAuthorizer.js
Created August 15, 2019 17:06
cognito-authorizer
console.log('Loading function');
var jwt = require('jsonwebtoken');
var request = require('request');
var jwkToPem = require('jwk-to-pem');
var userPoolId = 'us-east-2_xxxxxxxxxx';
var region = 'us-east-2'; //e.g. us-east-1
var iss = 'https://cognito-idp.' + region + '.amazonaws.com/' + userPoolId;
var pems;

Keybase proof

I hereby claim:

  • I am damianesteban on github.
  • I am damianesteban (https://keybase.io/damianesteban) on keybase.
  • I have a public key ASAraaD7HYLgBiehzlm7b_A-Y-_wPTAjm_18KyDu6qeR_go

To claim this, I am signing this object:

MSH|^~\&|ADT1|MCM|LABADT|MCM|198808181126|SECURITY|ADT^A04|MSG00001|P|2.4
EVN|A01-|198808181123
PID|||PATID1234^5^M11||JONES^WILLIAM^A^III||19610615|M-||2106-3|1200 N ELM STREET^^GREENSBORO^NC^27401-1020|GL|(919)379-1212|(919)271-3434~(919)277-3114||S||PATID12345001^2^M10|123456789|9-87654^NC
NK1|1|JONES^BARBARA^K|SPO|||||20011105
NK1|1|JONES^MICHAEL^A|FTH
PV1|1|I|2000^2012^01||||004777^LEBAUER^SIDNEY^J.|||SUR||-||1|A0-
AL1|1||^PENICILLIN||PRODUCES HIVES~RASH
AL1|2||^CAT DANDER
DG1|001|I9|1550|MAL NEO LIVER, PRIMARY|19880501103005|F||