Skip to content

Instantly share code, notes, and snippets.

@sandrinodimattia
sandrinodimattia / auth0-with-azure-b2c.md
Last active May 19, 2018 06:09
Connect Auth0 with Azure B2C

Connect Auth0 with Azure AD B2C

Configuration

  1. Create an Azure AD B2C Directory
  2. Create a Regular Web Application (set the url here to https://YOUR_AUTH0_ACCOUNT/login/callback)
  3. Create a key
  4. Take note of the Application ID and the Key
  5. Create a sign in policy (you will have a name like B2C_1_signing)

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@maiermic
maiermic / variance.md
Last active September 26, 2023 16:07
Description of the four kinds of variance: covariance, contravariance, invariance and bivariance.

Variance

The term variance describes how subtyping between higher kinded types is related to subtyping relations of their type arguments.

Higher Kinded Types

A higher kinded type composes type arguments to a new type. I use square bracket notation to define a higher kinded type:

C[T] // The higher kinded type `C` composes type argument `T` to a new type `C[T]`.

The same works with multiple type arguments:

@diegoconcha
diegoconcha / redux_egghead_notes.md
Last active January 18, 2022 13:23
Redux Egghead.io Notes

###Redux Egghead Video Notes###

####Introduction:#### Managing state in an application is critical, and is often done haphazardly. Redux provides a state container for JavaScript applications that will help your applications behave consistently.

Redux is an evolution of the ideas presented by Facebook's Flux, avoiding the complexity found in Flux by looking to how applications are built with the Elm language.

####1st principle of Redux:#### Everything that changes in your application including the data and ui options is contained in a single object called the state tree

// npm i mkdirp node-fetch minimist
var path = require('path');
var fs = require('fs');
var fetch = require('node-fetch');
var mkdirp = require('mkdirp');
var argDefaults = {
dir:'test',
template: 'module'
}
@paulirish
paulirish / what-forces-layout.md
Last active May 24, 2024 19:16
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
const compose = (...fns) => (x) => fns.reduce( (v, f) => v.then ? v.then(f) : f(v), x)
@mvidacovich
mvidacovich / SortHelper.cs
Created July 29, 2015 18:23
Queryable extension for sorting on strings
void Main()
{
var collection = Student; // all students
collection.OrderBy("FirstName",true).Skip(0).Take(50).Select (s => new {s.StudentId, s.FirstName}).Dump();
collection.OrderBy("FirstName",true).Skip(50).Take(50).Select (s => new {s.StudentId, s.FirstName}).Dump();
}
public static class SortHelper
{
public static IQueryable<T> OrderBy<T>(this IQueryable<T> queryable, string propertyName, bool asc)
@gaearon
gaearon / combining.js
Created June 3, 2015 18:03
Combining Stateless Stores
// ------------
// counterStore.js
// ------------
import {
INCREMENT_COUNTER,
DECREMENT_COUNTER
} from '../constants/ActionTypes';
const initialState = { counter: 0 };
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"jasmine": true,
"phantomjs": true
},
"settings": {
"ecmascript": 6,