Skip to content

Instantly share code, notes, and snippets.

View Firsto's full-sized avatar
☄️
I may be slow to respond.

Roman Zaostrovsky Firsto

☄️
I may be slow to respond.
View GitHub Profile
@matthewjberger
matthewjberger / instructions.md
Last active April 30, 2025 13:54
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@elihart
elihart / CyclicAdapter.java
Last active February 11, 2022 14:21
Cyclic Adapter: An Android RecyclerView Adapter that supports endless cyclical scrolling
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.Adapter;
import android.support.v7.widget.RecyclerView.AdapterDataObserver;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.view.ViewGroup;
import java.util.List;
/**
* This Adapter class wraps another Adapter in order to support cyclical scrolling.
@kytta
kytta / .gitlab-ci.yml
Created August 4, 2018 17:08
GitLab CI config for an Android project
image: jangrewe/gitlab-ci-android
variables:
ANDROID_COMPILE_SDK: "27"
APP_NAME: "NameOfYourApp"
cache:
key: ${CI_PROJECT_ID}
paths:
- .m2/
@mega-arbuz
mega-arbuz / .gitlab-ci.yml
Last active October 30, 2020 12:38
GitLab CI yml
image: jangrewe/gitlab-ci-android
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew
cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/
@shardul
shardul / AppExtensions.kt
Created June 3, 2019 10:10
Save Serializables in Shared Preferences with Kotlin and GSON [Android]
@Throws(JsonIOException::class)
fun Serializable.toJson(): String {
return Gson().toJson(this)
}
@Throws(JsonSyntaxException::class)
fun <T> String.to(type: Class<T>): T where T : Serializable {
return Gson().fromJson(this, type)
}