Skip to content

Instantly share code, notes, and snippets.

Avatar

Stefano Bonetta bonnyfone

View GitHub Profile
@bonnyfone
bonnyfone / build.gradle
Created Jul 29, 2016 — forked from danielgomezrico/build.gradle
Gradle / Android tasks to run findbugs and pmd static code checkers after assembleDebug. thanks to https://gist.github.com/rciovati/8461832
View build.gradle
// How to use it inside any gradle build
apply from: "quality.gradle"
@bonnyfone
bonnyfone / gen_resconfig.sh
Last active Jan 8, 2018
Simple bash script which automatically generates locales resConfigs snippet from your project's res/ directory
View gen_resconfig.sh
#!/bin/bash
GREEN='\033[0;32m'
NC='\033[0m'
printf "Generating resConfig from resource dir: $1\n"
resconfig="resConfigs"
for values in `ls $1 | grep values-`; do
log="Inspecting $values"
if [ -f "$1/$values/strings.xml" ]
then
suffix=`echo $values | sed 's/values-//g'`
@bonnyfone
bonnyfone / gist:4edabbe39927a363bfbe
Last active Aug 29, 2015
ShadowyTextView: stronger "shadow" effect on text
View gist:4edabbe39927a363bfbe
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Build;
import android.util.AttributeSet;
import android.widget.TextView;
/**
View gist:11e7f3a89aa2d10a689e
package com.designfuture.music.util;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.regex.Pattern;
import com.musixmatch.android.util.LogHelper;
View gist:3fec7de3eebd39f3982b
find . -mmin -800 | xargs cat | grep offsetRectBetweenParentAndChild
You can’t perform that action at this time.