Skip to content

Instantly share code, notes, and snippets.

@ErikHellman
ErikHellman / twig.kt
Last active November 21, 2017 09:31
Twig - A logcat wrapper using Kotlin reified generics
package se.hellsoft.twig
import android.util.Log
import se.hellsoft.kotlinhacks.BuildConfig
/**
* Verbose logging. Will be stripped from release builds.
*/
inline fun <reified T> T.logv(error: Throwable? = null, m: () -> String) {
if (BuildConfig.DEBUG) {
@mkjiau
mkjiau / axios-interceptors-refresh-token.js
Last active February 17, 2025 14:25
Axios interceptors for token refreshing and more than 2 async requests available
let isRefreshing = false;
let refreshSubscribers = [];
const instance = axios.create({
baseURL: Config.API_URL,
});
instance.interceptors.response.use(response => {
return response;
}, error => {
@INQTR
INQTR / axios-interceptors-refresh-token.js
Last active March 2, 2025 13:30
Axios interceptors token refresh for few async requests. ES6
import axios from "axios";
import { settings } from "../settings";
import { authAPI } from ".";
const request = axios.create({
baseURL: settings.apiV1,
});
request.interceptors.request.use(
(config) => {
@WotC-Charlie
WotC-Charlie / output_log.txt
Last active January 16, 2019 16:34
Output Log from build 843_654609 for those interested in parsing MTG Arena logs.
Initialize engine version: 2018.1.6f1 (57cc34175ccf)
GfxDevice: creating device client; threaded=1
Direct3D:
Version: Direct3D 11.0 [level 11.1]
Renderer: NVIDIA GeForce GTX 1080 (ID=0x1b80)
Vendor: (null)
VRAM: 3072 MB
Driver: 22.21.13.8189
Begin MonoManager ReloadAssembly
- Completed reload, in 0.102 seconds
@WotC-Charlie
WotC-Charlie / cards.json
Created January 15, 2019 23:32
Output Log, Cards.json and Loc.json from client version 990.673967 for those interested in parsing MTG Arena logs.
This file has been truncated, but you can view the full file.
[
{
"grpid": 65961,
"titleId": 173532,
"isToken": false,
"isCollectible": true,
"isCraftable": true,
"artSize": 0,
"power": 1,
"toughness": 1,