Control ⌃
Option ⌥
Command ⌘
Shift ⇧
/* Look into android.provider.Settings | |
Not all settings may be available on customized versions of Android, | |
so be sure to catch ActivityNotFoundException. */ | |
try { | |
startActivity(new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS)); | |
} catch (ActivityNotFoundException e) { | |
// Unavailable | |
} |
public boolean canConnect() { | |
ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); | |
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); | |
return activeNetworkInfo != null && activeNetworkInfo.isConnected(); | |
} |
========== Navigation ========== | |
CTRL+C OR Ctrl+[ instead of ESC. | |
1/2 ½ BOL (Begin-of-line) | |
0 BOL (Begin-of-line) | |
$ EOL (End-of-line) | |
H Goto HEADER (Top of the screen) | |
M Goto MIDDLE of BUFFER | |
L Goto last (bottom). |
# Plug in device via USB first | |
adb devices | |
adb tcpip 5555 | |
# Unplug device | |
adb connect 192.168.1.10 | |
adb devices |
// One | |
if(BuildConfig.DEBUG) { | |
Toast.makeText(this, "Debug mode", Toast.LENGTH_SHORT).show(); | |
} | |
// Two | |
try { | |
appInfo = pacMan.getApplicationInfo(pacName, 0); | |
} catch (NameNotFoundException e) { | |
Toast.makeText(this, "Could not find package " + pacName, Toast.LENGTH_SHORT).show(); |
// Social tag generator | |
http://secretsaucehq.com/mega-tags/ | |
// Social media optimizer | |
http://smo.knowem.com | |
// Social media ranking tool | |
http://socialdebug.com | |
// Twitter card validator |
// Paste inside public void paint() | |
g.setColor(Color.black); | |
g.setFont(new Font(null)); | |
for ( int X=0; X<800; X += 50 ) | |
g.drawString( String.valueOf(X), X, 50 ); | |
for ( int Y=100; Y<600; Y += 50 ) | |
g.drawString( String.valueOf(Y), 28, Y ); | |
// lines | |
g.setColor(Color.lightGray); | |
for ( int X=0; X<800; X += 50 ) |
Adding Hidden Agendas | |
Adjusting Bell Curves | |
Aesthesizing Industrial Areas | |
Aligning Covariance Matrices | |
Applying Feng Shui Shaders | |
Applying Theatre Soda Layer | |
Asserting Packed Exemplars | |
Attempting to Lock Back-Buffer | |
Binding Sapling Root System | |
Breeding Fauna |
# create the pre-commit file & make it executable | |
touch .git/hooks/pre-commit | |
chmod +x .git/hooks/pre-commit | |
# The line below is important! | |
#!/bin/bash | |
# Don't push if TODO is in the source for HEAD | |
dont_push_flag="TODO" | |
flag_found=`git grep --color "$dont_push_flag" HEAD` |