Skip to content

Instantly share code, notes, and snippets.


Brais Gabín BraisGabin

  • Barcelona (Spain)
View GitHub Profile
BraisGabin /
Last active Dec 22, 2020
Update detekt configuration
#!/usr/bin/env bash
mv config/detekt/detekt.yml config/detekt/detekt.yml.old
./gradlew detektGenerateConfig
diff config/detekt/detekt.yml config/detekt/detekt.yml.old >config/detekt/detekt.patch
read -p "Update detekt and then press ENTER" ignore
rm config/detekt/detekt.yml
./gradlew detektGenerateConfig
patch config/detekt/detekt.yml --no-backup-if-mismatch --merge <config/detekt/detekt.patch
rm config/detekt/detekt.patch
BraisGabin / Feature.kt
Created Sep 23, 2019
An implementation of MVI inspired by MVICore by Badoo
View Feature.kt
package com.b21
import com.jakewharton.rxrelay2.PublishRelay
import com.jakewharton.rxrelay2.Relay
import io.reactivex.BackpressureStrategy
import io.reactivex.Flowable
import io.reactivex.functions.Consumer
import org.reactivestreams.Subscriber
BraisGabin /
Last active Aug 29, 2016
[Pokémon GO] Simple script to get a table with all the CP Multipliers
public class CPM {
public static void main(String[] args) {
// Extracted from:
float[] cpm = {
0.094f, 0.16639787f, 0.21573247f, 0.25572005f, 0.29024988f,
0.3210876f, 0.34921268f, 0.37523559f, 0.39956728f, 0.42250001f,
0.44310755f, 0.46279839f, 0.48168495f, 0.49985844f, 0.51739395f,
0.53435433f, 0.55079269f, 0.56675452f, 0.58227891f, 0.59740001f,