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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"strconv" | |
) |
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
# -*- coding: utf-8 -*- | |
require 'oauth' | |
require 'json' | |
require 'sinatra/base' | |
require 'net/http' | |
class NmaGw < Sinatra::Base | |
set :logging, 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
// ==UserScript== | |
// @name Amazon product link | |
// @namespace http://takuo.jp/ | |
// @description アマゾンの商品リンクコピペ用 | |
// @match http://www.amazon.co.jp/* | |
// ==/UserScript== | |
var asinElem = document.getElementById('ASIN'); | |
if (asinElem) { | |
var url = "http://amazon.jp/dp/" + asinElem.value; | |
var elem = document.getElementById("tafContainerDiv"); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="jp.takuo.android.sharetoclipboard" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk android:minSdkVersion="4" /> | |
<application | |
android:icon="@drawable/ic_launcher" |
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> |
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
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 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) { | |
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
#!/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] |
NewerOlder