Skip to content

Instantly share code, notes, and snippets.

View maxirosson's full-sized avatar

Maxi Rosson maxirosson

View GitHub Profile
name: Increment Version
on:
workflow_dispatch:
inputs:
versionIncrementType:
description: 'The type of increment'
type: choice
required: true
options:
- MAJOR
@maxirosson
maxirosson / releases_hub.yml
Created October 13, 2021 01:27
.github/workflows/releases_hub.yml
name: "Upgrade Dependencies"
on:
schedule:
- cron: "0 13 * * 3"
workflow_dispatch:
inputs:
pullRequestsMax:
description: 'The maximum amount of pull requests to create during the action execution.'
required: true
default: '5'
package com.dipien.firebase.remoteconfig
import com.google.firebase.remoteconfig.FirebaseRemoteConfig
import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
class StaticFirebaseRemoteConfigValue(private val remoteConfigParameter: RemoteConfigParameter) : FirebaseRemoteConfigValue {
override fun asLong(): Long {
return remoteConfigParameter.getDefaultValue().toString().toLong()
}
enum class SampleRemoteConfigParameter constructor(private val defaultValue: Any) : RemoteConfigParameter {
SAMPLE_BOOLEAN_PARAMETER(true),
SAMPLE_STRING_PARAMETER("value1"),
SAMPLE_LONG_PARAMETER(5),
SAMPLE_DOUBLE_PARAMETER(1.2);
override fun getKey(): String {
return name.lowercase()
}
package com.dipien.firebase.remoteconfig
interface RemoteConfigParameter {
fun getKey(): String
fun getDefaultValue(): Any
}
package com.dipien.firebase.remoteconfig
import android.content.Context
import android.util.Log
import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.google.firebase.ktx.Firebase
import com.google.firebase.remoteconfig.FirebaseRemoteConfig
import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
import com.google.firebase.remoteconfig.ktx.remoteConfig
package com.dipien.startup
import android.content.ContentProvider
import android.content.ContentValues
import android.database.Cursor
import android.net.Uri
import android.os.Handler
import android.os.Looper
import android.util.Log
package com.dipien.startup
import android.app.Activity
import android.app.Application
import android.content.Context
import android.os.Bundle
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.OnLifecycleEvent
import androidx.lifecycle.ProcessLifecycleOwner
@maxirosson
maxirosson / labeler_config.yml
Created August 31, 2021 20:39
Github Action - Labeler - Code Owners
version: 1
labels:
- label: "dev1"
files:
- "module1/.*"
- label: "dev2"
files:
- "module3/.*"
- label: "team1"
files:
@maxirosson
maxirosson / labeler_config.yml
Created August 31, 2021 20:24
Github Action - Labeler - Modules
version: 1
labels:
- label: "circleci"
files:
- ".circleci/.*"
- label: "github"
files:
- ".github/.*"
- label: "gradle"
files: