This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
export PATH="/usr/local/opt/[email protected]/bin:$PATH" | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/ddmeng/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# no logging in production | |
-assumenosideeffects class android.util.Log { | |
v(...); | |
d(...); | |
i(...); | |
w(...); | |
e(...); | |
println(...); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Bulbasaur", | |
"id": "#001", | |
"imageurl": "https://assets.pokemon.com/assets/cms2/img/pokedex/full/001.png" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.content.res.Resources; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.Rect; | |
import android.support.v7.widget.SwitchCompat; | |
import android.text.Layout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.view.View; | |
public interface StickyHeaderInterface { | |
/** | |
* This method gets called by {@link StickyHeaderItemDecoration} to fetch the position of the header item in the adapter | |
* that is used for (represents) item at specified position. | |
* | |
* @param itemPosition int. Adapter's position of the item for which to do the search of the position of the header item. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dagger.Module; | |
import dagger.android.ContributesAndroidInjector; | |
@Module | |
public abstract class ActivityModule { | |
@ContributesAndroidInjector(modules = {FragmentBuildersModule.class}) | |
abstract MainActivity contributeMainActivity(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RecyclerHeadersDecoration extends RecyclerView.ItemDecoration { | |
private HeaderAdapter adapter; | |
private SparseArray<View> headers; | |
public interface HeaderAdapter { | |
boolean hasHeader(int position); | |
View getHeaderView(int position); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.ActivityManager; | |
import android.content.Context; | |
import android.os.Process; | |
import android.util.Log; | |
import java.util.List; | |
public class ProcessUtils { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
rxPermissions = RxPermissions.getInstance(this); | |
rxPermissions.setLogging(true); | |
setContentView(R.layout.act_main); | |
surfaceView = (SurfaceView) findViewById(R.id.surfaceView); | |
RxView.clicks(findViewById(R.id.enableCamera)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ddmeng.githubclient.model; | |
import com.google.gson.annotations.Expose; | |
import com.google.gson.annotations.SerializedName; | |
import javax.annotation.Generated; | |
@Generated("org.jsonschema2pojo") | |
public class Endpoints { |