Skip to content

Instantly share code, notes, and snippets.

View adriangl's full-sized avatar
💻
Back to work!

Adrián García adriangl

💻
Back to work!
View GitHub Profile
@yamidragut
yamidragut / ListAdapterTemplate
Last active March 17, 2020 20:30
RecyclerView ListAdapter with androidx and binding based in the one of Arif Khan: https://android.jlelse.eu/recylerview-list-adapter-template-in-kotlin-6b9814201458
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.RecyclerView
class ${NAME}(private val onItemClickListener: (${Model_Class}) -> Unit) :
ListAdapter<${Model_Class}, ${NAME}.ItemViewHolder>(DiffCallback()) {
@jpickwell
jpickwell / README.md
Last active September 18, 2020 05:09
Remove old casks from Homebrew-Cask.
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@imartinez
imartinez / Bugsnag Error Widget for Dashing.md
Last active July 29, 2016 08:02
Bugsnag Error Widget for Dashing

#Bugsnag Error Widget for Dashing.io

Dashing Widget for displaying Bugsnag errors count. Supports any number of bugsnag projects and error configurations.

Preview

##Usage

To use this widget you have two options:

@imartinez
imartinez / Google Play Reviews Widget for Dashing.md
Last active February 28, 2017 09:02
Google Play Reviews Widget for Dashing
@imartinez
imartinez / Google Play Rating Widget for Dashing.md
Last active February 22, 2017 05:38
Google Play Rating Widget for Dashing
@rocboronat
rocboronat / PermissionGranter.java
Last active December 26, 2022 07:05
Tap the "allow" button while running an Android instrumental test using UIAutomator
package com.fewlaps.android.permissiongranter;
import android.app.Activity;
import android.content.pm.PackageManager;
import android.os.Build;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
import android.support.test.uiautomator.UiObjectNotFoundException;
import android.support.test.uiautomator.UiSelector;
import android.support.v4.content.ContextCompat;
@danielgallegovico
danielgallegovico / Triple.java
Last active June 16, 2016 11:01
Container to ease passing around a tuple of three objects.
/*
* Copyright (C) 2016 Daniel Gallego Vico.
*
* 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
@blacklee
blacklee / ffmpeg-to-480p.sh
Created February 19, 2016 13:43
ffmpeg convert video to 480p
ffmpeg -i input.mp4 -s hd480 -c:v libx264 -crf 23 -c:a aac -strict -2 output.mp4
@pabloogc
pabloogc / checkstyle.xml
Last active October 19, 2015 07:38
checkstyle.xml
<?xml version="1.0"?><!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<!--module name="NewlineAtEndOfFile"/-->
<module name="FileLength" />
<module name="FileTabCharacter" />
<!-- Trailing spaces -->