Skip to content

Instantly share code, notes, and snippets.

View falvojr's full-sized avatar

Venilton FalvoJr falvojr

View GitHub Profile
@falvojr
falvojr / speech2learning-package-diagram.mermaidmd
Created November 24, 2023 18:35
Speech2Learning Package Diagram
graph RL;
subgraph "Infrastructure";
Web(Web & Devices) <--> Con
UI("User Interface (UI)") <--> Pre
DB(Databases & External Integrations) <--> Gat
subgraph "Adapters";
Con(Controllers) <--> UC
Pre(Presenters) <--> UC
Gat(Gateways) -..-> |implements| IGat
@falvojr
falvojr / ifood-dev-week.ipynb
Last active July 21, 2023 21:40
ifood-dev-week.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@falvojr
falvojr / application.properties
Last active January 4, 2023 00:30
Snippets de Código Utilizados na Live "DIO Fullstack Labs - Dia 1": https://youtu.be/Ity0Aa_ytPM
server.port=8080
# https://www.baeldung.com/spring-boot-h2-database#database-configuration
spring.datasource.url=jdbc:h2:mem:dio-game-awards
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=password
# https://www.baeldung.com/spring-boot-h2-database#h2-console
spring.h2.console.enabled=true
@falvojr
falvojr / 1.1.themes.xml
Last active May 14, 2023 02:57
santander-dev-week-bankline-android
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<!-- https://m3.material.io/libraries/mdc-android/getting-started -->
<style name="Theme.Banklineandroid" parent="Theme.Material3.Light">
<!-- https://m3.material.io/libraries/mdc-android/color-theming -->
<item name="colorPrimary">@color/primary_600</item>
<item name="colorPrimaryContainer">@color/primary_100</item>
<item name="colorOnPrimaryContainer">@color/primary_900</item>
<item name="colorPrimaryInverse">@color/primary_200</item>
</style>
@falvojr
falvojr / activity_detail.xml
Last active June 27, 2022 01:35
Tela de detalhe de partidas com Toolbar personalizada e uso do componente RatingBar.
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".DetailActivity">
<!-- Adding an image to the prominent top app bar:
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* Retriable Task, manual solution.
*
* @see <a href="https://stackoverflow.com/a/2759040/3072570">ExecutorService that interrupts tasks after a timeout</a>
* @see <a href="https://stackoverflow.com/a/4738630/3072570">Retry Task Framework</a>
public class AuthActivity extends BaseActivity implements AuthContract.View {
@BindView(R.id.ivGitHubStatus) ImageView mImgStatusImage;
@BindView(R.id.tvGitHubStatus) TextView mLblStatusText;
@BindView(R.id.tilUsername) TextInputLayout mWrapperTxtUsername;
@BindView(R.id.tilPassword) TextInputLayout mWrapperTxtPassword;
@BindView(R.id.btOAuth) Button mBtnOAuth;
@Inject @Named("secret") SharedPreferences mSharedPrefs;
@Inject AppHelper mAppHelper; //TODO Dagger!
import java.util.Arrays;
import java.util.List;
import rx.Observable;
import rx.Observer;
/**
* Created by falvojr on 1/11/17.
*
* @see <a href="https://github.com/ReactiveX/RxJava/wiki//Alphabetical-List-of-Observable-Operators">
@Module
public class NetworkModule {
static final String RETROFIT_GITHUB = "GitHub";
static final String RETROFIT_GITHUB_STATUS = "GitHubStatus";
static final String RETROFIT_GITHUB_OAUTH = "GitHubOAuth";
private static final int CACHE_SIZE_10_MB = 10 * 1024 * 1024;
@Provides