This file contains hidden or 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
| Just use for version 1.x and 2.x: | |
| Robolectric.application; | |
| And for version 3.x: | |
| RuntimeEnvironment.application; | |
| Link: http://stackoverflow.com/questions/13684094/how-can-we-access-context-of-an-application-in-robolectric |
This file contains hidden or 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
| git push -u origin <branch-name> | |
| URL: http://stackoverflow.com/questions/2765421/push-a-new-local-branch-to-a-remote-git-repo-and-track-it-too |
This file contains hidden or 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
| sudo env "PATH=$PATH" cmd | |
| URL: http://superuser.com/questions/709515/command-not-found-when-using-sudo |
This file contains hidden or 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
| wget -r --no-parent http://site.com/songs/ | |
| URL: http://www.howtogeek.com/171948/how-can-i-download-an-entire-web-site/ |
This file contains hidden or 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
| first step: git merge <branch> | |
| second step: solve conflicts | |
| third step: git commit | |
This file contains hidden or 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
| java.util.logging.Logger.getLogger("org.apache.http.wire").setLevel(java.util.logging.Level.FINEST); | |
| java.util.logging.Logger.getLogger("org.apache.http.headers").setLevel(java.util.logging.Level.FINEST); | |
| System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); | |
| System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true"); | |
| System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire", "debug"); | |
| System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http", "debug"); | |
| System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.headers", "debug"); |
This file contains hidden or 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
| Device Real: | |
| adb forward tcp:4444 localabstract:/adb-hub | |
| adb connect localhost:4444 | |
| Emulador: | |
| adb -d forward tcp:5601 tcp:5601 |
This file contains hidden or 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 BaseActivity extends AppCompatActivity{ | |
| private static final String TAG = "base_activity"; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| Log.i(TAG, "onCreate()"); | |
| } |
This file contains hidden or 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 BaseFragment extends Fragment{ | |
| private static final String TAG = "base_fragment"; | |
| @Override | |
| public void onAttach(Context context) { | |
| super.onAttach(context); | |
| Log.i(TAG, "onAttach()"); | |
| } |
This file contains hidden or 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
| android.applicationVariants.all { variant -> | |
| def appName | |
| if (project.hasProperty("applicationName")) { | |
| appName = applicationName | |
| } else { | |
| appName = parent.name | |
| } | |
| variant.outputs.each { output -> | |
| def newApkName |
OlderNewer