Skip to content

Instantly share code, notes, and snippets.

View djedi's full-sized avatar

Dustin Davis djedi

View GitHub Profile
@djedi
djedi / app.html
Last active March 2, 2018 13:44 — forked from deap82/app.html
collection observer vs observable, splice, replace combo solution - binding input in another repeater
<template>
<button click.delegate="addData()">Add Data</button>
<button click.delegate="popData()">Pop Data</button>
<button click.delegate="spliceData()">Splice Data</button>
<button click.delegate="replaceData()">Replace Data</button>
<hr>
Data:
<table>
<tr repeat.for="i of data.length">
@djedi
djedi / app.html
Last active March 9, 2018 21:51
collection observer vs observable, splice, replace combo solution - binding input in another repeater
<template>
<button click.delegate="addData()">Add Data</button>
<button click.delegate="popData()">Pop Data</button>
<button click.delegate="spliceData()">Splice Data</button>
<button click.delegate="replaceData()">Replace Data</button>
<hr>
Data:
<table>
<tr repeat.for="val of data">
@djedi
djedi / azure-validate-b2c.md
Last active June 4, 2024 17:27
Validate Azure B2C token.md

To validate an Azure B2C token in TypeScript, you can use the jsonwebtoken library. Here is a function that does this:

  1. Install the necessary libraries:
npm install jsonwebtoken jwks-rsa axios
  1. Write the function:
import jwt from 'jsonwebtoken';