Skip to content

Instantly share code, notes, and snippets.

View danielgomezrico's full-sized avatar

Daniel Gomez danielgomezrico

View GitHub Profile
@danielgomezrico
danielgomezrico / AlphaTransformation.java
Last active June 6, 2016 16:38 — forked from r0adkll/ShadeTransform.java
Android - alpha/shadow transformation for Picasso (This allows you to draw a transparent black shade over the source image)
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import com.squareup.picasso.Transformation;
public class AlphaTransformation implements Transformation {
/* The shade alpha of black to apply */
@danielgomezrico
danielgomezrico / DividerItemDecoration.java
Last active March 5, 2016 16:46 — forked from lapastillaroja/DividerItemDecoration.java
Android - Item decorators (separators) for RecyclerView items.
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;
@danielgomezrico
danielgomezrico / CircleTransform.java
Last active February 25, 2016 16:27 — forked from dtygel/CircleTransform.java
CircleTransform for Picasso
/*
* Copyright 2014 Julian Shen
*
* 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
@danielgomezrico
danielgomezrico / pre-commit.sh
Last active February 12, 2016 04:22 — forked from chadmaughan/pre-commit.sh
A git pre commit hook that runs the test task with the gradle wrapper
#!/usr/bin/env bash
# this hook is in SCM so that it can be shared
# to install it, create a symbolic link in the projects .git/hooks folder
#
# i.e. - from the .git/hooks directory, run
# $ ln -s ../../git-hooks/pre-commit.sh pre-commit
#
# to skip the tests, run with the --no-verify argument
# i.e. - $ 'git commit --no-verify'
@danielgomezrico
danielgomezrico / genymotionwithplay.txt
Created September 24, 2015 17:43 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161892865 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
@danielgomezrico
danielgomezrico / UIScrollView+PullToRefresh.m
Last active August 29, 2015 14:11 — forked from kreeger/UIScrollView+PullToRefresh.m
Category to add pull to refresh to any UIScrollView
//
// UIScrollView+PullToRefresh.h
// Created by Ben Kreeger (@kreeger), 2013/01/23.
//
#import <UIKit/UIKit.h>
/** Adds pull to refresh for a UIScrollView (or a UITableView). Abstracts away differences in frameworks between iOS 6
* and iOS 5 (in the case of the latter, `ODRefreshControl` is used.
*/