Skip to content

Instantly share code, notes, and snippets.

View dev-dafab's full-sized avatar

Fabrice Dufils Siyapdje dev-dafab

  • @wmts-area
  • Mannheim ( Germany )
View GitHub Profile
@dev-dafab
dev-dafab / App.java
Created December 24, 2018 05:25 — forked from thomasdarimont/App.java
Secure REST API Example with Spring Security, Spring Session, Spring Boot
package demo;
import java.io.Serializable;
import java.security.Principal;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@dev-dafab
dev-dafab / monorepo.md
Last active August 23, 2020 21:12
monorepo

Javascript

  • Init a Javascript/typescript/nodejs monorepo
npm install -g json
yarn config set workspaces-experimental true
mkdir -p monorepo/packages && cd monorepo && yarn init -y

# Config package.json
@dev-dafab
dev-dafab / Fetch_Interceptor.md
Created April 12, 2021 07:22
Intercept HTTP GET fetch Request
const isValueCached = (key: string) => {
  const value = localStorage.getItem(key);
  return value !== null;
};

const xhrResourcesToCache = [
  '/api/resources1',
  '/api/resources2',