Skip to content

Instantly share code, notes, and snippets.

View frigidBlade7's full-sized avatar
🏠
Working from home

Nathany Attipoe frigidBlade7

🏠
Working from home
View GitHub Profile
@frigidBlade7
frigidBlade7 / clean_code.md
Created November 8, 2021 10:11 — 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

@frigidBlade7
frigidBlade7 / README.md
Created August 6, 2020 17:08 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@frigidBlade7
frigidBlade7 / database.rules.json
Created June 12, 2020 21:24 — forked from codediodeio/database.rules.json
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@frigidBlade7
frigidBlade7 / BaseViewModel.java
Created January 4, 2020 19:33
base viewmodel for android containing implementations for navigation and snackbars
public class BaseViewModel extends AndroidViewModel {
private MutableLiveData<Event<NavigationCommand>> navigationCommandMutableLiveData = new MutableLiveData<>();
private MutableLiveData<Event<SnackbarCommand>> snackbarCommandMutableLiveData = new MutableLiveData<>();
public BaseViewModel(@NonNull Application application) {
super(application);
}
@frigidBlade7
frigidBlade7 / NavigationCommand.java
Created January 3, 2020 11:19
Helper class to assist with event driven navigation using the single live event paradigm
import androidx.annotation.NonNull;
import androidx.navigation.NavDirections;
public abstract class NavigationCommand {
public static class NavigationAction extends NavigationCommand {
@NonNull
private final NavDirections directions;
@frigidBlade7
frigidBlade7 / SnackbarCommand.java
Created January 3, 2020 11:18
Helper class to assist with event driven snackbar notifications using the single live event paradigm
public abstract class SnackbarCommand {
public static class SnackbarString extends SnackbarCommand{
private String snackbarString;
public SnackbarString(String snackbarString) {
this.snackbarString = snackbarString;
}