Skip to content

Instantly share code, notes, and snippets.

View heitorcolangelo's full-sized avatar

Heitor Colangelo heitorcolangelo

View GitHub Profile
import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import java.io.IOException;
import retrofit.Callback;
import retrofit.Response;
import retrofit.Retrofit;
public class FragmentUtils {
public static FragmentTransaction ensureTransaction(final FragmentManager fragmentManager) {
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_left, R.anim.slide_in_right, R.anim.slide_out_left);
return fragmentTransaction;
}
public static Fragment getFragment(final FragmentManager fragmentManager, final String tag) {
return fragmentManager.findFragmentByTag(tag);
@joseluisq
joseluisq / terminal-git-branch-name.md
Last active April 20, 2024 02:26
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing