Skip to content

Instantly share code, notes, and snippets.

View drackp2m's full-sized avatar
🛀
With peace of mind.

Marc Jovaní González drackp2m

🛀
With peace of mind.
  • Bit2Me
  • Castellón de la Plana, Spain
  • 00:23 (UTC +02:00)
View GitHub Profile
@drackp2m
drackp2m / auth.interceptor.ts
Last active August 11, 2023 19:22
Angular HTTP Interceptor for Pausing and Resuming Unauthorized Requests with JWT
import {
HttpClient,
HttpErrorResponse,
HttpEvent,
HttpHandler,
HttpInterceptor,
HttpRequest,
HttpResponse,
} from '@angular/common/http';
import { Injectable } from '@angular/core';
@drackp2m
drackp2m / eslint-stylish-formatter-with-relative-paths.js
Last active June 30, 2023 17:45
Eslint stylish formatter with relative path instead of default absolute path (for easy "Open file in editor" on VSCode).
/**
* @fileoverview Stylish reporter
* @author Sindre Sorhus
*/
'use strict';
const chalk = require('chalk'),
stripAnsi = require('strip-ansi'),
table = require('text-table');