Skip to content

Instantly share code, notes, and snippets.

View artsuhov's full-sized avatar
🏠
Working from home

Artyom Suhov artsuhov

🏠
Working from home
View GitHub Profile
@alexoro
alexoro / NoLimitRecycledViewPool.java
Created July 29, 2019 10:22
RecycledViewPool with unlimited number of ViewHolders
package com.vk.im.ui.utils.recyclerview;
import android.support.v7.widget.RecyclerView;
import android.util.SparseIntArray;
/**
* RecycledViewPool with unlimited number of ViewHolders
* {@author uas.sorokin@gmail.com}
*/
public class NoLimitRecycledViewPool extends RecyclerView.RecycledViewPool {
@zakkak
zakkak / .git-commit-template
Last active May 15, 2024 00:06 — forked from adeekshith/.git-commit-template.txt
This commit message template that helps you write great commit messages and enforce it across your team.
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char)
# |<---- Preferably using up to 50 chars --->|<------------------->|
# Example:
# [feat] Implement automated commit messages
# (Optional) Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# (Optional) Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@kaushikgopal
kaushikgopal / android_lifecycle_recommendations.md
Last active February 2, 2022 07:28
Notes on opportune moments to do "stuff" in the Android Lifecycle
  • In general you want to try and put things in onStart and onStop for logical start and stops.

Activity

onCreate

  • Dagger inject self into graph
  • setContentView(R.layout.xxx)
  • Butterknife.bind(this)
  • RxJava CompositeSubscription.add (if NON UI related work being done)
  • realm = Realm.getDefaultInstance();
@brson
brson / gist:9dec4195a88066fa42e6
Last active May 7, 2024 02:34
A Rust Syntax Guide

A Guide to Rust Syntax

A very brief guide to Rust syntax. It assumes you are already familiar with programming concepts.

This was written in 2014. It is not a good reference for Rust today, though the content is still correct.

cheats.rs looks like a good alternative.

Assert macro