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
#:~/.config/google-chrome/Defaul/Preferences | |
#在此文件中修改最后一段如下: | |
"webkit": { | |
"webprefs": { | |
"default_fixed_font_size": 14, | |
"default_font_size": 16, | |
"fixed_font_family": "Monospace", | |
"minimum_font_size": 12, | |
"sansserif_font_family": "Sans", |
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
protected String[] doInBackground(String... credentials) { | |
String consumer_secret = mActivity.getString(R.string.oauth_consumer_secret); | |
HttpClient client = new DefaultHttpClient(); | |
HttpPost request = new HttpPost("https://www.instapaper.com/api/1/oauth/access_token"); | |
CommonsHttpOAuthConsumer consumer = new CommonsHttpOAuthConsumer(mActivity.getString(R.string.oauth_consumer_key), | |
consumer_secret); | |
List<BasicNameValuePair> params = Arrays.asList( | |
new BasicNameValuePair("x_auth_username", credentials[0]), | |
new BasicNameValuePair("x_auth_password", credentials[1]), | |
new BasicNameValuePair("x_auth_mode", "client_auth")); |
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
var params = new Object(); | |
var id; | |
var closeTimer; | |
var text = ""; | |
var textOrig; | |
var entities; | |
var tweet; | |
var timeOut = 1000 * localStorage.getItem("timeout"); | |
$(document).ready(function() { | |
paramsIn = window.location.href.split("?"); paramsIn = paramsIn[1].split("&") || null; for(var a in paramsIn) { |
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
首先下载一个头像墙,将其拉伸/压缩以使所有的头像长宽均为整数; | |
然后将文件信息和头像长宽填入 consts.py 内; | |
使用 hashall.py 生成 hashes.dat 文件; | |
使用 testone.py x.jpg 测试头像是否在头像墙内, | |
testone.py 会将头像墙中最接近的一个头像保存在 result.png, | |
同时在标准输出输出一行信息,格式为 (差异度, 位置), | |
实验表明,差异度小于(不等于)5大体上可以认为是相同的。 |
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
# max-routes 600 | |
route 1.51.0.0 255.255.0.0 net_gateway | |
route 1.184.0.0 255.254.0.0 net_gateway | |
route 27.148.0.0 255.252.0.0 net_gateway | |
route 49.52.0.0 255.252.0.0 net_gateway | |
route 49.120.0.0 255.252.0.0 net_gateway | |
route 49.140.0.0 255.254.0.0 net_gateway | |
route 49.208.0.0 255.254.0.0 net_gateway | |
route 58.17.0.0 255.255.0.0 net_gateway | |
route 58.18.0.0 255.254.0.0 net_gateway |
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
txtblk='\033[0;30m' # Black - Regular | |
txtred='\033[0;31m' # Red | |
txtgrn='\033[0;32m' # Green | |
txtylw='\033[0;33m' # Yellow | |
txtblu='\033[0;34m' # Blue | |
txtpur='\033[0;35m' # Purple | |
txtcyn='\033[0;36m' # Cyan | |
txtwht='\033[0;37m' # White | |
bldblk='\033[1;30m' # Black - Bold | |
bldred='\033[1;31m' # Red |
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
# 30 minutes Lisp in Ruby | |
# Hong Minhee <http://dahlia.kr/> | |
# | |
# This Lisp implementation does not provide a s-expression reader. | |
# Instead, it uses Ruby syntax like following code: | |
# | |
# [:def, :factorial, | |
# [:lambda, [:n], | |
# [:if, [:"=", :n, 1], | |
# 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
protected String[] doInBackground(String... credentials) { | |
String consumer_secret = mActivity.getString(R.string.oauth_consumer_secret); | |
HttpClient client = new DefaultHttpClient(); | |
HttpPost request = new HttpPost("https://www.instapaper.com/api/1/oauth/access_token"); | |
CommonsHttpOAuthConsumer consumer = new CommonsHttpOAuthConsumer(mActivity.getString(R.string.oauth_consumer_key), | |
consumer_secret); | |
List<BasicNameValuePair> params = Arrays.asList( | |
new BasicNameValuePair("x_auth_username", credentials[0]), | |
new BasicNameValuePair("x_auth_password", credentials[1]), | |
new BasicNameValuePair("x_auth_mode", "client_auth")); |
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
/** | |
* OAUTHnesia for Java Android Class | |
* | |
* @package OAUTHnesia | |
* @subpackage Java Android | |
* @category OAUTH Client | |
* @author Batista R. Harahap <[email protected]> | |
* @link http://www.bango29.com | |
* @license MIT License - http://www.opensource.org/licenses/mit-license.php | |
* |
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 OAuthActivity extends Activity { | |
public static String OAUTH_URL = "https://github.com/login/oauth/authorize"; | |
public static String OAUTH_ACCESS_TOKEN_URL = "https://github.com/login/oauth/access_token"; | |
public static String CLIENT_ID = "YOUR_CLIENT_ID"; | |
public static String CLIENT_SECRET = "YOUR_CLIENT_SECRET"; | |
public static String CALLBACK_URL = "http://localhost"; | |
@Override |
OlderNewer