Skip to content

Instantly share code, notes, and snippets.

@khris
khris / AndroidManifest.xml
Created June 25, 2014 06:54
Insecure link handling with `TextView`
<?xml version="1.0" encoding="utf-8"?>
<manifest
...
package="net.tekhnokracy.intentredirect.app"
... >
<application ... >
<activity
android:name="net.tekhnokracy.intentredirect.app.DummyActivity"
android:exported="false" >
<intent-filter>
@khris
khris / conf.py.dist
Created May 11, 2014 13:40
Simple Twitter bot
OAUTH_TOKEN = '<YOUR ACCESS TOKEN>'
OAUTH_SECRET = '<YOUR ACCESS TOKEN SECRET>'
CONSUMER_KEY = '<YOUR API KEY>'
CONSUMER_SECRET = '<YOUR API SECRET>'
# seconds
INTERVAL = 30
@khris
khris / gist:9801921
Last active August 29, 2015 13:57
Hack ActionBar
View decorView = getWindow().getDecorView();
int actionBarViewId = decorView.getContext().getResources().getIdentifier("android:id/action_bar", null, null);
View actionBarView = getWindow().getDecorView().findViewById(actionBarViewId);
actionBarView.setClickable(true);
actionBarView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(v.getContext(), "ActionBar is clicked", Toast.LENGTH_LONG).show();
}
});