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
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
View get_android_service_call_numbers.sh
#!/bin/bash
ADBShell () { adb ${2+-s} $2 shell "$1" | tr -d '\r'
}
GetAndroidVersion () {
GOOGLE_SOURCE="https://android.googlesource.com"
REPO="platform/frameworks/base"
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
amir-rahnama / dataset.py
Created Dec 6, 2016
Write Your Own Custom Image Dataset for Tensorflow
View dataset.py
"""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
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 <geir.sporsheim@gmail.com>
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@sporsh
sporsh / parse.py
Created Nov 22, 2012
Implementation of Android Debug Bridge (ADB) protocol in Twisted
View parse.py
from adb import protocol
data = (
'\x4f\x50\x45\x4e\x02\x00\x00\x00'
'\x00\x00\x00\x00\x09\x00\x00\x00'
'\x31\x03\x00\x00\xb0\xaf\xba\xb1'
'\x73\x68\x65\x6c\x6c\x3a\x6c\x73'
'\x00'
)
@ktnr74
ktnr74 / service_call_test.py
Last active Jan 8, 2020
*update_transaction_codes.py* 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. *service_call_test.py* shows how it can be used
View service_call_test.py
#!/usr/bin/python
import os
import sys
import time
import yaml
import subprocess
import re
import struct
@lolindrath
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
q
# 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
timyates / Currying.java
Last active Mar 7, 2020
Currying and composition in Java 8
View Currying.java
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 ;
View get_android_service_call_numbers.sh
#!/bin/bash
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 ro.build.version.release')}
echo -e "ANDROID_SERIAL=$ANDROID_SERIAL\nro.build.version.release=$TAG" 1>&2
@lopspower
lopspower / README.md
Last active Aug 9, 2021
Publish AAR to jCenter and Maven Central
View README.md

Publish AAR to jCenter and Maven Central

Twitter

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