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
# veiw all branches, local and remote | |
git branch -a | |
# checkout and switch to remote branch | |
git checkout -b somebranch origin/somebranch | |
# if something's screwwed up, or it didn't quite work | |
git pull | |
git reset --hard origin/somebranch |
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
# list tmux sessions | |
tmux list-sessions | |
# attach to session | |
tmux attach -t <session name/number> |
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 final enum BusProvider { | |
INSTANCE; | |
public final Bus BUS; | |
private BusProvider() { | |
BUS = new Bus(); | |
} | |
} |
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 DumbLoader extends CursorLoader { | |
private static final String TAG = "DumbLoader"; | |
public DumbLoader(Context context) { | |
super(context); | |
} | |
@Override | |
public Cursor loadInBackground() { | |
// this is just a simple query, could be anything that gets a cursor |
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
git reset --soft HEAD^ |
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
# where bar.git is the main project | |
git clone --recursive git://github.com/foo/bar.git |
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); | |
// details omitted | |
mPane = (SlidingPaneLayout) findViewById(R.id.pane); | |
mPane.openPane(); | |
getSupportFragmentManager().beginTransaction() |
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 MainActivity extends ActionBarActivity { | |
private String[] mPlanetTitles; | |
private DrawerLayout mDrawerLayout; | |
private ListView mDrawerList; | |
private CharSequence mTitle; | |
private ActionBarDrawerToggle mDrawerToggle; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { |
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 MainActivity extends ActionBarActivity { |
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
// lives in the project directory | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.5.+' | |
} | |
} |