Skip to content

Instantly share code, notes, and snippets.

@who
who / dexcount
Created April 24, 2015 20:41
Counts methods in a jar. Useful for testing to see if a jar is going to contribute to the 65K method limit in Android
#!/bin/bash
if [ ! -e `which dx` ]
then
echo "Please make sure the dx executable (from android-sdk build-tools) is in your $PATH"
exit 1
fi
tmpFolder=$(mktemp -d /tmp/tmp.XXXXXXXX);
dx --dex --output=$tmpFolder/temp.dex $1 >> /dev/null 2>&1
cat $tmpFolder/temp.dex | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'
{
"swagger": "2.0",
"info": {
"version": "0.0.0",
"title": "Simple API"
},
"schemes": [
"http",
"https"
],
{
"swagger": "2.0",
"info": {
"version": "0.0.0",
"title": "Simple API"
},
"schemes": [
"https"
],
"paths": {
{
"swagger": "2.0",
"info": {
"version": "0.0.0",
"title": "Big API"
},
"schemes": [
"http",
"https"
],
swagger: "2.0"
info:
version: 0.0.0
title: Big API
schemes:
- http
- https
paths:
/79d7645d47554205bb48b1ef2562b2ef:
get:
swagger: "2.0"
info:
version: 0.0.0
title: An API
paths:
"/testing/{testString}":
post:
parameters:
- name: testString
in: path
{
"swagger": "2.0",
"info": {
"version": "0.0.0",
"title": "Simple API"
},
"paths": {
"/": {
"get": {
"operationId": "unoriginalOperationId",

This method ...

    @POST
    @Path("/strings")
    @ApiOperation(value = "Send a string in the body",
        nickname = "gimmieString",
        authorizations = @Authorization(value = "basicAuth"))
    public String gimmieString(@ApiParam("theString") String theString, @Auth User user) {
        return "you sent: "+ theString;
#!/bin/bash
TMP=$(mktemp /tmp/svn_revisions_XXXXXXXXXXXX.csv);
echo "Processing ...";
echo "PATH,REVISION" > $TMP;
for svndir in $(find . -name .svn)
do
PARENTDIR=$(dirname $svndir);
{
"swagger": "2.0",
"info": {
"version": "0.0.0",
"title": "Simple API"
},
"host":"api.example.com",
"paths": {
"/api": {
"get": {