Skip to content

Instantly share code, notes, and snippets.

Working from home

Júnior César Abreu juniorcesarabreu

Working from home
View GitHub Profile
juniorcesarabreu / How to Install Older version of Chrome
Last active Jun 25, 2022
How to Install Older version of Chrome Extensions
View How to Install Older version of Chrome
View money decimal mask
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 /
Created Feb 18, 2018
Android Shared preferences example

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

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 / Disable Firebase Analytics Crashylitcs
Last active Nov 12, 2021
Desabilitar Firebase Analytcs e Crashlytcs no Android
View Disable Firebase Analytics Crashylitcs

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": ""
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 /
Created Jul 7, 2021
Como criar arquivos de mídia na pasta downloads no Android 10 (API 29) - Problema do Armazenamento por escopo
juniorcesarabreu / De-obfuscating the crash
Last active Jun 29, 2021
De-obfuscating the Firebase crash reports
View De-obfuscating the crash

De-obfuscating the Firebase crash reports

Add the following config to app's file:

-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
# prevent Crashlytics obfuscation
-keep class** { *; }
juniorcesarabreu /
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.


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

int main ()
   char str[50];

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