Skip to content

Instantly share code, notes, and snippets.

View fredgrott's full-sized avatar
👾
focusing on flutter cross platform mobile dev

Fred Grott fredgrott

👾
focusing on flutter cross platform mobile dev
View GitHub Profile
@fredgrott
fredgrott / antdirnameeclipse
Created January 2, 2012 14:43
antdirnameeclipse
<!-- Eclipse AntClassloader gives weird results for
<dirname property="root.d" file="${basedir}"/>
we use this instead
-->
<dirname property="root.d" file="${ant.file.Beowolf}"/>
@fredgrott
fredgrott / android build.xmladt16xpath
Created January 11, 2012 19:15
android build.xmladt16xpath
<xpath input="AndroidManifest.xml" expression="/manifest/application/@android:hasCode"
output="manifest.hasCode" default="true"/>
<xpath input="AndroidManifest.xml"
expression="/manifest/@package" output="manifest.package" />
@fredgrott
fredgrott / proguard.cfg
Created January 12, 2012 20:49
updatedproguardcfg
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-ignorewarnings
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable,*Annotation*,Signature
@fredgrott
fredgrott / newwaytologusinglog4j
Created January 24, 2012 19:56
new way to log
package com.github.shareme.loga;
import org.apache.log4j.Level;
import de.mindpipe.android.logging.log4j.LogConfigurator;
import android.os.Environment;
import android.util.Config;
/**
@fredgrott
fredgrott / LruContextInMemoryCache
Created February 8, 2012 15:40
LruContextInMemoryCache
/*
* Copyright (C) 2011 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
@fredgrott
fredgrott / android_icon_gimpfu.py
Created February 13, 2012 10:22
androidicon_gimpfu
#!/usr/bin/env python
# GIMP plugin for applying Android menu icon style
# For batch processing, use it like this:
# gimp -i --batch-interpreter=python-fu-eval -b 'pdb.python_fu_androidicon_batch(None, None, "/path/to/pictures/*.svg", "/path/to/res");pdb.gimp_quit(1)'
from gimpfu import *
import glob
import os
import shutil
@fredgrott
fredgrott / twiterbs_image_helper
Created February 14, 2012 20:38
twitterbs_image_helper
{% comment%}<!--
Be careful we do not want to access or iterate an array as an associative
array of associative arrays
We are cheating here by using
assign siteImgArrayObject to tell us what associative array to iterate over
out of collection of associative arrays.
@fredgrott
fredgrott / cukesfordroidsadbcommands
Created February 23, 2012 08:24
CukesforDroidsabdcommmands
- adb shell am instrument com.leandog/com.google.android.testing.nativedriver.server.ServerInstrumentation
- adb forward tcp:54129 tcp:54129a
@fredgrott
fredgrott / gist:2308939
Created April 5, 2012 08:13
android_lint_ant
<condition property="bash.it" value="/bin/bash" else="cmd">
<and>
<not>
<os family="windows"/>
</not>
</and>
</condition>
<property name="lint.script" value="${sdk.dir}/tools/lint"/>
<property name="lint.report" location="${basedir}/project.docs/lintreport.html"/>
@fredgrott
fredgrott / emma-androidcoverage
Created April 22, 2012 01:52
correct emma coverage android
<emma>
<report sourcepath="${tested.project.absolute.dir}/${source.dir}"
verbosity="${verbosity}">
<!-- TODO: report.dir or something like should be introduced if necessary -->
<infileset dir="${tested.project.absoulte.dir}">
<include name="coverage.em"/>
</infileset>
<infileset dir=".">