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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
private void publishStory() { | |
Session session = Session.getActiveSession(); | |
if (session != null){ | |
// Check for publish permissions | |
List<String> permissions = session.getPermissions(); | |
if (!isSubsetOf(PERMISSIONS, permissions)) { | |
pendingPublishReauthorization = true; | |
Session.NewPermissionsRequest newPermissionsRequest = new Session |
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
// The factory instance is re-useable and thread safe. | |
Twitter twitter = TwitterFactory.getSingleton(); | |
Status status = twitter.updateStatus(latestStatus); | |
System.out.println("Successfully updated the status to [" + status.getText() + "]."); |
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
ConfigurationBuilder cb = new ConfigurationBuilder(); | |
cb.setDebugEnabled(true) | |
.setOAuthConsumerKey("*********************") | |
.setOAuthConsumerSecret("******************************************") | |
.setOAuthAccessToken("**************************************************") | |
.setOAuthAccessTokenSecret("******************************************"); | |
TwitterFactory tf = new TwitterFactory(cb.build()); | |
Twitter twitter = tf.getInstance(); |
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
cd android-sdk-macosx | |
./build-tools/19.1.0/dexdump -f /path/to/your/apk | grep method_ids_size |
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
// start tracing to "/sdcard/calc.trace" Debug.startMethodTracing("calc"); // ... // stop tracing Debug.stopMethodTracing(); |
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
Bundle params = new Bundle(); | |
params.putString("message", "YOUR_MESSAGE_HERE"); | |
WebDialog requestsDialog = ( | |
new WebDialog.RequestsDialogBuilder(getActivity(), | |
Session.getActiveSession(), | |
params)) | |
.setOnCompleteListener(new OnCompleteListener() { | |
@Override | |
public void onComplete(Bundle values, |
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
webView.setWebViewClient(new WebViewClient() { | |
@Override | |
public boolean shouldOverrideUrlLoading(WebView view, String url) { | |
if (Uri.parse(url).getScheme().equals("market")) { | |
try { | |
Intent intent = new Intent(Intent.ACTION_VIEW); | |
intent.setData(Uri.parse(url)); | |
Activity host = (Activity) view.getContext(); | |
host.startActivity(intent); | |
return true; |
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
Intent sendIntent = new Intent(); | |
sendIntent.setAction(Intent.ACTION_SEND); | |
sendIntent.putExtra(Intent.EXTRA_TEXT, "Your Message Here"); | |
sendIntent.setType("text/plain"); | |
sendIntent.setPackage("Package Name Here"); | |
startActivity(sendIntent); |
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
gsutil ls gs://uspto-pair/applications/0800401* |
OlderNewer