In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:
- You can separate the code into different repositories.
h scroll left | |
j scroll down | |
k scroll up | |
l scroll right | |
gg scroll to top of the page | |
G scroll to bottom of the page | |
f activate link hints mode to open in current tab | |
F activate link hints mode to open in new tab | |
r reload |
public class EndlessListActivity<D> extends Activity { | |
private EndlessRecyclerOnScrollListener mEndlessScrollListener; | |
private EndlessListAdapter mAdapter; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
RecyclerView listView = (RecyclerView) findViewById(R.id.list); | |
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); |
package com.example.retrofit.loader; | |
import retrofit.Response; | |
/** | |
* A wrapper around the Retrofit {@link Response} that will | |
* throw any loading errors upon retrieval. | |
* | |
* @param <T> The data type that was loaded. | |
*/ |
public class Alachiq extends MultiDexApplication { | |
... | |
private static Context context; | |
public static SlidrConfig config; | |
private GithubService githubService; | |
private Picasso picasso; | |
private static GithubApplicationComponent component; | |
private JobManager jobManager; | |
private static Alachiq instance; |
Normally the installation of MySQL can be achieved with a single command, which executes a script provided by MacMiniVault :
bash <(curl -Ls http://git.io/eUx7rg)
However, at the time of writing the script is not compatible with OS X El Capitan (10.11)
An alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not first read the article "Homebrew and El Capitan"
Make sure Homebrew has the latest formulae, so run brew update
first
(For OS X) | |
See: https://www.jetbrains.com/idea/help/tuning-intellij-idea.html | |
> mkdir ~/Library/Preferences/IntelliJ\ IDEA\ 14\ CE/ | |
> cp /Applications/IntelliJ\ IDEA\ 14\ CE.app/Contents/bin/idea.vmoptions ~/Library/Preferences/IntelliJ\ IDEA\ 14\ CE/ | |
> vi ~/Library/Preferences/IntelliJ\ IDEA\ 14\ CE/idea.vmoptions | |
Add the line below: | |
-Duser.name=Duncan Dickinson |
// Dagger 1 example | |
@Module( | |
complete = false, | |
library = true | |
) | |
public final class ApiModule { | |
@Provides | |
@Singleton | |
Retrofit provideRetrofit(Gson gson, Application app) { | |
return new Retrofit.Builder() |