Skip to content

Instantly share code, notes, and snippets.

View felipeska's full-sized avatar
🏠
Working from home

Felipe felipeska

🏠
Working from home
View GitHub Profile
.----------------. .----------------. .-----------------. .----------------. .----------------. .----------------.
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. |
| | ____ ____ | || | ____ | || | ____ _____ | || | ____ | || | ___ ____ | || | _____ _____ | |
| ||_ \ / _|| || | .' `. | || ||_ \|_ _| | || | .' `. | || | |_ ||_ _| | || ||_ _||_ _|| |
| | | \/ | | || | / .--. \ | || | | \ | | | || | / .--. \ | || | | |_/ / | || | | | | | | |
| | | |\ /| | | || | | | | | | || | | |\ \| | | || | | | | | | || | | __'. | || | | ' ' | | |
| | _| |_\/_| |_ | || | \ `--' / | || | _| |_\ |_ | || | \ `--' / | || | _| | \ \_ | || | \ `--' / | |
| ||_____||_____|| || | `.____.' | || ||_____|\____| | || | `.____.' | || | |____||____| | || | `.__.' | |
| | | || | | || |
@adrianamendez
adrianamendez / fragment_map
Created December 17, 2013 20:07
Fixing the rendering problem when use Google Maps Android API v2, it has been tested on Android V. 2.3.6 and 4.0.4, i hope it works for you. Enjoy it! ;D Supported by @felipeska
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.cyrilmottier.polaris2.maps.SupportMapFragment" />
<!-- The usual fragment contains the map, i'm using polaris2,
Polaris is a framework enhancing the Google Maps Android API v2. It aims to
fix some of the most frustrating bugs of the original library and provide additional features. -->
@uarun
uarun / filetype.vim
Created August 3, 2011 19:32
Gradle syntax highlighting in vim
# ~/.vim/filetype.vim
au BufNewFile,BufRead *.gradle setf groovy
@eveliotc
eveliotc / android-select-device
Last active February 5, 2019 06:10
My (android) dev aliases and scripts
#! /bin/bash
# from http://dtmilano.blogspot.com/2012/03/selecting-adb-device.html
# selects an android device
PROGNAME=$(basename $0)
UNAME=$(uname)
DEVICE_OPT=
for opt in "$@"
do
case "$opt" in
@cr7pt0gr4ph7
cr7pt0gr4ph7 / README.md
Last active October 13, 2019 15:02
Gradle Dependency Resolution

Gradle Dependency Resolution

Normal Gradle behavior

The default behavior of Gradle to pick the newest version also applies if a lower version has been declared locally, but another dependency transitively pulls in a newer version. This is in contrast with Maven, where a locally declared version will always win.

For example, if your build.gradle specifies the dependency org.springframework:spring-tx:3.2.3.RELEASE, and another dependency declares 4.0.5.RELEASE as a transitive dependency, then 4.0.5.RELEASE will take precedence:

dependencies {
    compile("org.springframework.data:spring-data-hadoop:2.0.0.RELEASE")
    compile("org.springframework:spring-tx:3.2.3.RELEASE")

// will select org.springframework:spring-tx:4.0.5.RELEASE

@christopherperry
christopherperry / CheckableLinearLayout
Created September 18, 2012 22:43
A LinearLayout that implements the Checkable interface, allowing a LinearLayout to be put into a checked state.
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Checkable;
import android.widget.LinearLayout;
@tfrank64
tfrank64 / AppDelegate.swift
Created June 8, 2014 17:32
Swift UITabBar Programmatically
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
// Override point for customization after application launch.
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
var nav1 = UINavigationController()
var first = FirstViewController(nibName: nil, bundle: nil)
nav1.viewControllers = [first]
var second = SecondViewController(nibName: nil, bundle: nil)
var nav2 = UINavigationController()
@mannodermaus
mannodermaus / LoganSquareConverter.java
Last active September 16, 2021 12:28
LoganSquare Retrofit Converter
package retrofit.converter;
import com.bluelinelabs.logansquare.LoganSquare;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
import retrofit.converter.ConversionException;
import retrofit.converter.Converter;
@chemouna
chemouna / RecyclerViewAssertions.java
Last active November 19, 2021 07:16
Some assertions to help with testing recyclerview with espresso.
import android.support.test.espresso.NoMatchingViewException;
import android.support.test.espresso.ViewAssertion;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.google.common.truth.Truth;
import java.util.ArrayList;
import org.hamcrest.Matcher;
import org.junit.Assert;
@mttkay
mttkay / Pager.java
Created November 4, 2015 15:46
A simple Rx based pager
public class Pager<I, O> {
private static final Observable FINISH_SEQUENCE = Observable.never();
private PublishSubject<Observable<I>> pages;
private Observable<I> nextPage = finish();
private Subscription subscription = Subscriptions.empty();
private final PagingFunction<I> pagingFunction;
private final Func1<I, O> pageTransformer;