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
--- gwibber/microblog/twitter.py.orig 2009-11-30 14:50:00.000000000 +0900 | |
+++ gwibber/microblog/twitter.py 2009-11-30 14:50:13.000000000 +0900 | |
@@ -169,7 +169,7 @@ | |
def get_messages(self): | |
return simplejson.loads(self.connect( | |
- "https://twitter.com/statuses/friends_timeline.json" +'?'+ | |
+ "https://twitter.com/statuses/home_timeline.json" +'?'+ | |
urllib.urlencode({"count": self.account["receive_count"] or "20"}))) | |
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
diff -uNr gwibber.orig/actions.py gwibber/actions.py | |
--- gwibber.orig/actions.py 2009-08-28 16:28:19.000000000 +0900 | |
+++ gwibber/actions.py 2009-11-30 16:36:42.000000000 +0900 | |
@@ -65,6 +65,26 @@ | |
def include(self, client, msg): | |
return msg.account.supports(microblog.can.RETWEET) | |
+ | |
+class RetweetNative(MessageAction): | |
+ icon = "mail-forward" |
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
# mime decode for ruby 1.9 | |
def mime_decode( input, out_charset = 'utf-8' ) | |
while input.sub!(/(=\?[A-Za-z0-9_-]+\?[BQbq]\?[^\?]+\?=)(?:(?:\r\n)?[\s\t])+(=\?[A-Za-z0-9_-]+\?[BQbq]\?[^\?]+\?=)/, '\1\2') | |
end | |
begin | |
ret = input.sub!( /=\?([A-Za-z0-9_-]+)\?([BQbq])\?([^\?]+)\?=/ ) { | |
charset = $1 | |
enc = $2.upcase | |
word = $3 | |
word = word.unpack( { "B"=>"m*", "Q"=>"M*" }[enc] ).first |
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
// ==UserScript== | |
// @name Rakuten uncheck news | |
// @namespace http://takuo.jp/ | |
// @description 楽天の購入時メルマガチェックはずし | |
// @match https://*.rakuten.co.jp/* | |
// ==/UserScript== | |
var elems = document.getElementsByTagName("input"); | |
for (var i = 0; i < elems.length; i++) { | |
var elem = elems[i]; | |
if (elem.type == "checkbox" && elem.name.match(/^(newsId|news_?check|rmail_check|shop_rating_check)/)) { |
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
#!/usr/bin/ruby | |
# | |
# usage: | |
# ./twitter-oauth.rb <CONSUMER_KEY> <CONSUMER_SECRET> <user> <password> | |
# | |
require 'rubygems' | |
require 'oauth' | |
CONSUMER_KEY=ARGV[0] | |
CONSUMER_SEC=ARGV[1] |
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 void onClick(View v) { | |
new Thread(new Runnable() { | |
public void run() { | |
final Bitmap bitmap = loadImageFromNetwork("http://example.com/image.png"); | |
mImageView.post(new Runnable() { | |
public void run() { | |
mImageView.setImageBitmap(bitmap); | |
} | |
}); | |
} |
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 void onClick(View v) { | |
new DownloadImageTask().execute("http://example.com/image.png"); | |
} | |
private class DownloadImageTask extends AsyncTask<String, Void, Bitmap> { | |
/** The system calls this to perform work in a worker thread and | |
* delivers it the parameters given to AsyncTask.execute() */ | |
protected Bitmap doInBackground(String... urls) { | |
return loadImageFromNetwork(urls[0]); | |
} |
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 void onClick(View v) { | |
startService(new Intent(this, MyService.class)); | |
} |
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 OAuthVerify extends Activity { | |
private static final String CONSUMER_KEY = ""; | |
private static final String CONSUMER_SECRET = ""; | |
private static final String CALLBACK_URL = "myoauthapp://oauthcallback/"; | |
private Context mContext; | |
private WebView mWebView; | |
private Twitter mTwitter; | |
private RequestToken mRequestToken; | |
private AccessToken mAccessToken; |
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
<application | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/app_name" android:theme="@android:style/Theme.Translucent"> | |
<activity | |
android:label="@string/activity_name" | |
android:name=".TweetLinkShare"> | |
<intent-filter> | |
<action android:name="jp.r246.twicca.ACTION_SHOW_TWEET" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
</intent-filter> |
OlderNewer