Skip to content

Instantly share code, notes, and snippets.

View vilmarbfilho's full-sized avatar
🤖
Trying make a world a better place

V1lm4r vilmarbfilho

🤖
Trying make a world a better place
View GitHub Profile
@keima
keima / HowToUseActivity.kt
Last active March 31, 2024 21:58
LifecycleOwner implemented RecyclerView ViewHolder & Adapter (concept design)
import android.os.Bundle
import android.util.Log
import android.view.ViewGroup
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.OnLifecycleEvent
import app.keima.android.recyclerviewsandbox.databinding.ActivityMainBinding
@Arinerron
Arinerron / permissions.txt
Last active April 14, 2025 21:41
A list of all Android permissions...
android.permission.ACCESS_ALL_DOWNLOADS
android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.ACCESS_CHECKIN_PROPERTIES
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
android.permission.ACCESS_DOWNLOAD_MANAGER
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
android.permission.ACCESS_DRM_CERTIFICATES
android.permission.ACCESS_EPHEMERAL_APPS
android.permission.ACCESS_FM_RADIO
@samkahchiin
samkahchiin / macvim
Last active September 30, 2023 22:15
- How to set the default font size in macvim
# Open Terminal
vim ~/.vimrc
# Mac OS-X -> .vimrc ; Window -> .gvimrc
# Add it in the file and adjust the font size (h12) accordingly
set guifont=Menlo\ Regular:h15
@baconpat
baconpat / RecycleViewMatcher.java
Created March 30, 2016 01:13
RecycleViewMatcher (updated for scrolling)
package com.foo.RecyclerViewMatcher;
import android.content.res.Resources;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
@lopspower
lopspower / README.md
Last active April 21, 2025 03:43
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

@rogerhu
rogerhu / Contact.java
Last active June 9, 2022 23:32
Endless scrolling with RecyclerVIew
package codepath.com.recyclerviewfun;
import java.util.ArrayList;
import java.util.List;
public class Contact {
private String mName;
private boolean mOnline;
public Contact(String name, boolean online) {
/*
* The function searchPlaces can be called continuously, no matter how many times it got invoked
* the Handler will remove all the last sequence request, and execute the last one.
* */
String fieldValue = "";
final private Handler handler = new Handler();
final private Runnable runnable = new Runnable() {
@Override
public void run() {
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active April 12, 2025 21:46
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@alanhoff
alanhoff / email.js
Last active May 17, 2021 22:50
Enviando e-mails usando Node.js e o nodemailer
// Enviando e-mails usando o Node.js e o famoso nodemailer
var nodemailer = require('nodemailer');
// Vamos criar a conta que irá mandar os e-mails
var conta = nodemailer.createTransport({
service: 'Gmail', // Existem outros services, você pode procurar
// na documentação do nodemailer como utilizar
// os outros serviços
auth: {
user: '[email protected]', // Seu usuário no Gmail
@staltz
staltz / introrx.md
Last active April 19, 2025 05:15
The introduction to Reactive Programming you've been missing