Skip to content

Instantly share code, notes, and snippets.


Angel Anton monday8am

View GitHub Profile
monday8am / sample_json.json
Created October 3, 2017 19:30
Sample JSON
View sample_json.json
"title": {
"en": "English",
"es": "Spanish"
"description": "Description"
monday8am / fastlane_beta.ruby
Last active November 21, 2019 03:08
Fastlane Beta
View fastlane_beta.ruby
desc ""
lane :beta do |lane|
# ensure you are in master branch
# ensure that master branch is clean
# check the semantic parameter entered
# run fastlane
# pass 'patch', 'minor' or 'major' as parameter
fastlane ios beta bump:patch
View fabric.ruby
desc "Deploy a new version to the Fabric."
lane :fabric do
# upload to Beta by Crashlytics
api_token: ENV['FABRIC_API_TOKEN'],
build_secret: ENV['FABRIC_BUILD_SECRET']
export FABRIC_API_TOKEN=1111
export FABRIC_BUILD_SECRET=x1x1x1x1x1
export GITHUB_TOKEN=11xx1x1x1x1
monday8am / network_middleware.kt
Last active April 1, 2018 11:58
Network Middleware fragment for Unidirectional Flow post.
View network_middleware.kt
// This middleware executes the async requests related with the Rest API
internal val networkMiddleware: Middleware<AppState> = { dispatch, state ->
{ next ->
{ action ->
when (action) {
// an async operation is called
is SetDeviceInfo -> { getDeviceDescription(deviceId = action.deviceId,
deviceInfo = action.payload,
dispatch = dispatch) }
monday8am / delivery_state.kt
Created April 1, 2018 12:31
Delivery state described in Kotlin
View delivery_state.kt
sealed class DeliveryState: StateType {
object NotStarted: DeliveryState()
data class SettingUp (val appId: AppId,
val serviceId: ServiceId,
val description: ServiceDescription? = null): DeliveryState()
data class Going (val progress: DeliveryProgress): DeliveryState()
data class IsIdle (val reason: Idle): DeliveryState()
data class Failed (val error: Throwable): DeliveryState()
data class Finished (val status: ServiceStatus): DeliveryState()
monday8am / delivery_state.swift
Created April 1, 2018 12:37
Delivery state described in Swift
View delivery_state.swift
enum DeliveryState: StateType {
case notStarted
case settingUp(appId: AppId,
serviceId: ServiceId,
description: ServiceDescription? = null)
case going(progres: DeliveryProgress)
case idle(reason: Idle)
case failed(error: Error)
case finished(status: ServiceStatus)
monday8am / typeHierarchy.kt
Last active April 17, 2018 20:10
TypeHierarchy adapter demostration
View typeHierarchy.kt
val gson = GsonBuilder()
.registerTypeHierarchyAdapter(, ResultSerializer())
monday8am / resultSerializer.kt
Last active April 20, 2018 16:49
Result serializer empty
View resultSerializer.kt
class ResultSerializer : JsonSerializer<Result<*, *>>, JsonDeserializer<Result<*, *>> {
override fun serialize(src: Result<*, *>?,
typeOfSrc: Type?,
context: JsonSerializationContext?): JsonElement? {
override fun deserialize(json: JsonElement?,
typeOfT: Type?,