Skip to content

Instantly share code, notes, and snippets.

View monday8am's full-sized avatar
🙃
meehh

Angel Anton monday8am

🙃
meehh
View GitHub Profile
@monday8am
monday8am / create_signed_app.ruby
Created January 13, 2019 19:32
Create signed Android app. Fastlane + Gradle
desc "Create a signed version of the app"
lane :signed_apk do
# get version and build number from git
# https://blog.uncommon.is/using-git-to-generate-versionname-and-versioncode-for-android-apps-aaa9fc2c96af
versionName = sh("git describe --dirty").gsub(/\s+/, "")
# +520 to sync version codes with the previous app.
versionCode = sh("git rev-list --first-parent --count origin/master").gsub(/\s+/, "").to_i + 520
keyPath ="#{sh("pwd").chomp}/keystore.jks"
@monday8am
monday8am / combineReducers.kt
Created March 31, 2019 14:59
CombineReducer method in Kotlin
//
// Reducer interface definition
//
typealias Reducer<ReducerStateType> = (action: Action, state: ReducerStateType?) -> ReducerStateType
//
// Combine reducers method
//
fun<T: StateType> combineReducers(vararg reducers: Reducer<T>): Reducer<T> {
return { action, state ->
@monday8am
monday8am / RepoResult.kt
Last active June 21, 2022 12:08
RepoResult
/* Different solutions for future RepoResult (?) object! */
/*
* James!
*/
sealed interface ResultReason
// Define an interface for navigation keys
interface NavigationKey : Parcelable
// Example implementation for a specific screen
@Parcelize
data class ProfileKey(val userId: String) : NavigationKey
// Navigation manager class
class Navigator(private val context: Context) {
@monday8am
monday8am / navigation.kt
Created October 10, 2024 10:33
Navigation example
// Define an interface for navigation keys
interface NavigationKey : Parcelable
// Example implementation for a specific screen
@Parcelize
data class ProfileKey(val userId: String) : NavigationKey
// Navigation manager class
class Navigator(private val context: Context) {