Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Júnior César Abreu juniorcesarabreu

🏠
Working from home
View GitHub Profile
@juniorcesarabreu
juniorcesarabreu / How to Install Older version of Chrome Extensions.md
Last active Jun 25, 2022
How to Install Older version of Chrome Extensions
View How to Install Older version of Chrome Extensions.md
View money decimal mask textWatcher.android.java.md
public class MoneyTextWatcher implements TextWatcher {
    private final WeakReference<EditText> editTextWeakReference;
    private final Locale locale;

    public MoneyTextWatcher(EditText editText, Locale locale) {
        this.editTextWeakReference = new WeakReference<EditText>(editText);
        this.locale = locale != null ? locale : Locale.getDefault();
    }
@juniorcesarabreu
juniorcesarabreu / SharedPreferences.android.md
Created Feb 18, 2018
Android Shared preferences example
View SharedPreferences.android.md

Create SharedPreferences

SharedPreferences pref = getApplicationContext().getSharedPreferences("MyPref", MODE_PRIVATE); 
Editor editor = pref.edit();

Storing data as KEY/VALUE pair

View Add “Edit with Gimp” to Windows context menu.md

Assuming you have GIMP 2.8 installed to the default directory, you can do this via a registry script created by David L. To add the 'Edit with GIMP' option to system image types, save the following as a .reg file and run it.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\Edit with GIMP]
@juniorcesarabreu
juniorcesarabreu / Disable Firebase Analytics Crashylitcs Android.md
Last active Nov 12, 2021
Desabilitar Firebase Analytcs e Crashlytcs no Android
View Disable Firebase Analytics Crashylitcs Android.md

Desabilitar Firebase Analytcs e Crashlytcs no Android

  • Adicione as variáveis ao build.gradle do módulo:
android {
 /* ... */
View websevice-example-checkin.json
{
"eventId": 1,
"name": "Junior Cesar Abreu",
"email": "junior@email.com"
}
@juniorcesarabreu
juniorcesarabreu / git-pull-all
Created Jul 31, 2021 — forked from grimzy/git-pull-all
Git pull all remote branches
View git-pull-all
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
@juniorcesarabreu
juniorcesarabreu / save-file-to-download-folder-android-10-api-29.md
Created Jul 7, 2021
Como criar arquivos de mídia na pasta downloads no Android 10 (API 29) - Problema do Armazenamento por escopo
View save-file-to-download-folder-android-10-api-29.md
@juniorcesarabreu
juniorcesarabreu / De-obfuscating the crash reports.md
Last active Jun 29, 2021
De-obfuscating the Firebase crash reports
View De-obfuscating the crash reports.md

De-obfuscating the Firebase crash reports

Add the following config to app's proguard-rules.pro file:

-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
# prevent Crashlytics obfuscation
-keep class com.google.firebase.crashlytics.** { *; }
-dontwarn com.google.firebase.crashlytics.**
@juniorcesarabreu
juniorcesarabreu / memset.md
Last active Jun 6, 2021
A função memset(str, c, n) copia o caracter c (um unsigned char) para os n primeiros caracteres da string apontada por str.
View memset.md

Exemplo

#include <stdio.h>
#include <string.h>

int main ()
{
   char str[50];

 strcpy(str,"This is string.h library function");