Skip to content

Instantly share code, notes, and snippets.

View Ashok-Varma's full-sized avatar
🎯
Focusing

Ashok Varma Ashok-Varma

🎯
Focusing
View GitHub Profile
@Ashok-Varma
Ashok-Varma / Debouncer.java
Last active June 5, 2018 08:37
Debouncer is a Util class for Android that Replicates Debounce Operator functionality in RxJava. Can be used for "libraries" or "light weight apps" or "apps that don't use RxJava".
import android.os.Handler;
import android.support.annotation.NonNull;
/**
* Class description
*
* @author ashok
* @version 1.0
* @since 04/06/18
*/
@Ashok-Varma
Ashok-Varma / install_android_sdk_tools_in_linux_for_custom_ci.md
Last active April 2, 2024 07:42
Install Android SDK tools in linux. Can be used for custom CI (Continuous Integration)
@Ashok-Varma
Ashok-Varma / Truss.java
Created December 29, 2017 16:48 — forked from JakeWharton/Truss.java
Extremely simple wrapper around SpannableStringBuilder to make the API more logical and less awful. Apache 2 licensed.
import android.text.SpannableStringBuilder;
import java.util.ArrayDeque;
import java.util.Deque;
import static android.text.Spanned.SPAN_INCLUSIVE_EXCLUSIVE;
/** A {@link SpannableStringBuilder} wrapper whose API doesn't make me want to stab my eyes out. */
public class Truss {
private final SpannableStringBuilder builder;
private final Deque<Span> stack;
@Ashok-Varma
Ashok-Varma / GAME_DATA_MOVES.json
Created August 8, 2016 15:07 — forked from rmkane/GAME_DATA_HISTORY.json
Pokemon GO - Game Data Statistics
[ {
"ID": 13,
"Name": "Wrap",
"Move Type": "Charge",
"Animation ID": 5,
"Type": "Normal",
"Power": 15,
"Accuracy Chance": 1,
"Stamina Loss Scalar": 0.06,
"Trainer Level Min": 1,
@Ashok-Varma
Ashok-Varma / GAME_MASTER_POKEMON_v0_2.tsv
Created August 8, 2016 14:40 — forked from anonymous/GAME_MASTER_POKEMON_v0_2.tsv
Pokemon from GAME_MASTER protobuf file v0.2 in a .tsv
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 27 columns, instead of 12. in line 2.
PkMn BaseStamina BaseAttack BaseDefense Type1 Type2 BaseCaptureRate BaseFleeRate CollisionRadiusM CollisionHeightM CollisionHeadRadiusM MovementType MovementTimerS JumpTimeS AttackTimerS QuickMoves CinematicMoves AnimTime Evolution EvolutionPips PokemonClass PokedexHeightM PokedexWeightKg HeightStdDev WeightStdDev FamilyId CandyToEvolve
1 90 126 126 HoloPokemonType.POKEMON_TYPE_GRASS HoloPokemonType.POKEMON_TYPE_POISON 0.1599999964237213 0.10000000149011612 0.3815000057220459 0.6539999842643738 0.27250000834465027 HoloPokemonMovementType.POKEMON_ENC_MOVEMENT_JUMP 10.0 1.149999976158142 29.0 d601dd01 5a3b76 6d56d53fdaac2a3f6d56d53f93a9ea3f0000000036ab0a403333b33fbfbbbb3f 02 HoloPokemonClass.POKEMON_CLASS_NORMAL 1 0.699999988079071 6.900000095367432 0.08749999850988388 0.862500011920929 HoloPokemonFamilyId.V0001_FAMILY_BULBASAUR 25
2 120 156 158 HoloPokemonType.POKEMON_TYPE_GRASS HoloPokemonType.POKEMON_TYPE_POISON 0.07999999821186066 0.07000000029802322 0.3187499940395355 0.637499988079071 0.2549999952316284 H
@Ashok-Varma
Ashok-Varma / GAME_MASTER_v0_1.protobuf
Created August 8, 2016 14:12 — forked from anonymous/GAME_MASTER_v0_1.protobuf
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@Ashok-Varma
Ashok-Varma / RecyclerCursorAdapter.java
Last active September 2, 2015 06:05 — forked from slidenerd/RecyclerViewAdapter.java
A single adapter that supports Cursor + an optional header + optional footer
import android.database.Cursor;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
public abstract class RecyclerCursorAdapter<U, V extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
//The number of headers to be displayed by default if child classes want a header
public static final int HEADER_COUNT = 2;
//The number of footers to be displated by default if child classes want a footer
/*
* Copyright (C) 2014 skyfish.jy@gmail.com
*
* 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