Skip to content

Instantly share code, notes, and snippets.

Frederik Dumazy dumazy

Block or report user

Report or block dumazy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dumazy / axios.refresh_token.js
Created Jan 2, 2019 — forked from Godofbrowser/axios.refresh_token.js
Axios interceptor for refresh token when you have multiple parallel requests
View axios.refresh_token.js
// for multiple requests
let isRefreshing = false;
let failedQueue = [];
const processQueue = (error, token = null) => {
failedQueue.forEach(prom => {
if (error) {
} else {
dumazy / AndroidLogKotlin.xml
Created Sep 4, 2017
Android Studio Live Templates for Log statements in Kotlin
View AndroidLogKotlin.xml
<templateSet group="AndroidLogKotlin">
<template name="logd" value="android.util.Log.d(&quot;$CLASS_NAME$&quot;, &quot;$METHOD_NAME$ (line $LINE$): $MESSAGE$&quot;)$END$" description="Log.d statement" toReformat="false" toShortenFQNames="true">
<variable name="CLASS_NAME" expression="groovyScript(&quot;if(_1.length() &gt; 23) { return _1.substring(0, 23)} else { return _1}&quot;, kotlinClassName())" defaultValue="" alwaysStopAt="true" />
<variable name="METHOD_NAME" expression="kotlinFunctionName()" defaultValue="" alwaysStopAt="false" />
<variable name="LINE" expression="lineNumber()" defaultValue="" alwaysStopAt="false" />
<variable name="MESSAGE" expression="" defaultValue="" alwaysStopAt="true" />
<option name="KOTLIN_STATEMENT" value="true" />
You can’t perform that action at this time.