Skip to content

Instantly share code, notes, and snippets.

View damianesteban's full-sized avatar
🎯
Focusing

Damian Esteban damianesteban

🎯
Focusing
View GitHub Profile
import { Injectable } from '@nestjs/common';
import dayjs from 'dayjs';
import { PassThrough } from 'stream';
import { DataSource } from 'typeorm';
import { CandidHttpService } from './candid-http.service';
import { ClaimsExtract } from './entities/claims-extract.entity';
import { mapJsonToModel } from './utils';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const csv = require('csv-parser');
@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: