Skip to content

Instantly share code, notes, and snippets.

View guilherme-v's full-sized avatar

Guilherme Silva guilherme-v

View GitHub Profile
@guilherme-v
guilherme-v / RetryWithExponentialBackOff
Created January 6, 2022 15:21 — forked from wotomas/RetryWithExponentialBackOff.java
Rxjava Retry With Exponential Backoff
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import rx.Observable;
import rx.functions.Func1;
import rx.functions.Func2;
import rx.schedulers.Schedulers;
/**
* Created by jimmy on 30/05/2017.
@guilherme-v
guilherme-v / MatrixCompose.kt
Created September 16, 2021 23:11 — forked from apkelly/MatrixCompose.kt
Matrix Animation
import android.graphics.Typeface
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.runtime.Composable
@guilherme-v
guilherme-v / restart android emulator in command line
Created September 14, 2020 00:11 — forked from russell-shizhen/restart android emulator in command line
restart android emulator in command line on MacOS
#!/bin/bash -ex
# NOTE: ANDROID_HOME must be configured as an environment variable.
# Kill all the existing adb servers and start over a new adb server.
function restart_adb_server() {
echo "********************* Restarting adb ... *********************"
adb kill-server
sleep 2
adb start-server
sleep 2
@guilherme-v
guilherme-v / clean_code.md
Last active August 24, 2018 17:18 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules