Skip to content

Instantly share code, notes, and snippets.

View gist:60efd1dba923796d33bb
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in D:\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
# For more details, see
# Add any project specific keep options here:
ADBShell () { adb ${2+-s} $2 shell "$1" | tr -d '\r'
GetAndroidVersion () {
ALL_TAGS=$(wget -qO - "$GOOGLE_SOURCE/$REPO/+refs/tags/?format=text" | \
tr -d '^{}' | cut -d/ -f3 | sort -u | grep -vE -- '-(cts|sdk)-' | grep -v "_r0")
amir-rahnama /
Created Dec 6, 2016
Write Your Own Custom Image Dataset for Tensorflow
"""A generic module to read data."""
import numpy
import collections
from tensorflow.python.framework import dtypes
class DataSet(object):
"""Dataset class object."""
def __init__(self,
sporsh / packet-adb.c
Created Apr 19, 2013
Android Debug Bridge (ADB) dissector for Wireshark
View packet-adb.c
* packet-adb.c
* Routines for Android Debug Bridge (ADB) protocol dissection
* Author: Geir Sporsheim <>
#include "config.h"
sporsh /
Created Nov 22, 2012
Implementation of Android Debug Bridge (ADB) protocol in Twisted
from adb import protocol
data = (
ktnr74 /
Last active Jan 8, 2020
** parses Android services source code to find out transaction codes and saves them in YAML format for later use. *transaction_codes.yaml* is an example of the resulting file. ** shows how it can be used
import os
import sys
import time
import yaml
import subprocess
import re
import struct
lolindrath / gist:4454638
Last active Jan 8, 2020 — forked from mdb/gist:4288296
How to Amend a Git Commit
View gist:4454638
# View the log to find the commit you want to edit:
git log
# Quit out of the log
# Rebase from the commit you want to edit, in interactive mode:
git rebase SOME_COMMIT_ID^ --interactive
# This will open an interactive menu in Vi
timyates /
Last active Mar 7, 2020
Currying and composition in Java 8
package java8tests ;
import java.util.function.BiFunction ;
import java.util.function.Function ;
public class Currying {
public void currying() {
// Create a function that adds 2 integers
BiFunction<Integer,Integer,Integer> adder = ( a, b ) -> a + b ;
ADBShell () { adb ${2+-s }$2 shell "$1" | tr -d '\r'
GetAndroidVersion () {
local ALL_TAGS=$(wget -qO - "$GOOGLE_SOURCE/$REPO/+refs/tags/?format=text" | \
tr -d '^{}' | cut -d/ -f3 | sort -u | grep -vE -- '-(cts|sdk)-' | grep -v "_r0")
TAG=${1:-$(ADBShell 'getprop')}
lopspower /
Last active Aug 9, 2021
Publish AAR to jCenter and Maven Central

Publish AAR to jCenter and Maven Central


EDIT: You can find this same updated tutorial here -> Medium

Now I'm going to list how to publish an Android libray to jCenter and then syncronize it with Maven Central:

  1. I use "Android Studio" and I have this simple android lib that I would like to be available on maven: CircularImageView