Skip to content

Instantly share code, notes, and snippets.

@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,
@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
@ModPhoenix
ModPhoenix / axios-interceptors-refresh-token.js
Last active August 26, 2024 00:24
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) => {
@mkjiau
mkjiau / axios-interceptors-refresh-token.js
Last active October 5, 2024 12:38
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 => {
@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) {
@kropp
kropp / Gtk3Demo.kt
Created May 16, 2017 10:31
GTK+ Demo Application in Kotlin/Native rewritten in OO-style
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@nickbutcher
nickbutcher / MainActivity.java
Last active August 20, 2021 16:15
A quick sample of the new physics-based animation library added in Support Library 25.3.0 docs: https://developer.android.com/reference/android/support/animation/package-summary.html output: https://twitter.com/crafty/status/842055117323026432
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@gokulkrishh
gokulkrishh / media-query.css
Last active November 10, 2024 02:00
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@cxyxlxdm
cxyxlxdm / GridSpacingItemDecoration.md
Last active April 19, 2024 08:43
Add column spacing in RecyclerView with GridLayoutManager

Android Recyclerview GridLayoutManager column spacing Here is the question, the first answer does not work well in my project,and it makes the spacing bigger between item and item. the second answer is quite perfect.But if RecyclerView has headers,it does not work well. Then I fixed it.

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
@zapidan
zapidan / git-change-author
Last active September 18, 2024 06:47
Change previous commits author/email with filter-branch
## Make sure your local repo settings are correct
git config --local --list
git config --local user.name "author name"
git config --local user.email "[email protected]"
## Change previous n commits
git rebase -i HEAD~n
# choose the commits to change by adding 'pick' or 'reword' (only for changing the message)
git commit --amend --author="Author Name <[email protected]>"
# change first commit in repo