This file contains hidden or 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
spawn openvpn --config /etc/openvpn/Global.ovpn | |
#expect "[sudo] password for hyvi: " | |
#send "密码\n" | |
#sleep 2 | |
expect "Enter Auth Username:" | |
send "邮箱\r" | |
sleep 2 | |
expect "Enter Auth Password:" | |
send "密码\r" | |
expect eof |
This file contains hidden or 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
http://tool.chinaz.com/ 站长工具 | |
http://www.linkwan.com/gb/ 网络测试(基于google地图) |
This file contains hidden or 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
(function(q){ | |
!!q?q.toggle(): | |
(function(d,j){ | |
j=d.createElement('script'); | |
j.src='//ime.qq.com/fcgi-bin/getjs'; | |
j.setAttribute('ime-cfg','lt=2'); | |
d.getElementsByTagName('head')[0].appendChild(j) | |
} | |
) | |
(document)} |
This file contains hidden or 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
/** | |
* http://javascript0.org/wiki/Portable_sendAsBinary | |
* portable sendAsBinary | |
*/ | |
XMLHttpRequest.prototype.sendAsBinary = function(datastr) { | |
function byteValue(x) { | |
return x.charCodeAt(0) & 0xff; | |
} | |
var ords = Array.prototype.map.call(datastr, byteValue); |
This file contains hidden or 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
/** | |
* 遗留的问题: 这是utf-8 ?? | |
* 关于encodeURIComponent 与 encodeURI 的最佳实践 | |
* http://stackoverflow.com/questions/75980/best-practice-escape-or-encodeuri-encodeuricomponent | |
* | |
Unicode Strings | |
In most browsers, calling window.btoa on a Unicode string will cause a Character Out Of Range exception. | |
To avoid this, consider this pattern, noted by Johan Sundström |
This file contains hidden or 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
/** | |
* 关于事件监听最佳实践 | |
* http://www.cnblogs.com/snowball/archive/2006/08/16/478531.html | |
*/ | |
function associateObjWithEvent(obj, methodName){ | |
return (function(e){ | |
e = e||window.event; | |
// obj == DthmlObject , it's OK , but obj == new DthmlObject(),it's not |
This file contains hidden or 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
/** | |
* Getting window size and scroll bars position in JavaScript/DHTML | |
* http://www.softcomplex.com/docs/get_window_size_and_scrollbar_position.html | |
*/ | |
function f_clientWidth() { | |
return f_filterResults ( | |
window.innerWidth ? window.innerWidth : 0, | |
document.documentElement ? document.documentElement.clientWidth : 0, | |
document.body ? document.body.clientWidth : 0 |
This file contains hidden or 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
问题: | |
hadoop能正常的启动,但是在mapreduce的时候出现 | |
Lost tracker错误。datanode进程中只有一个hadoop进程。 | |
err信息 : | |
# | |
# A fatal error has been detected by the Java Runtime Environment: | |
# |
This file contains hidden or 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
/* | |
12306 Auto Login => A javascript snippet to help you auto login 12306.com. | |
Copyright (C) 2011 Kevintop | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes 12306.user.js |
This file contains hidden or 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
nmap <F2> a<C-R>=strftime("%c")<CR><Esc> | |
"http://stackoverflow.com/questions/69998/tabs-and-spaces-in-vim | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
call pathogen#infect() | |
syntax on | |
filetype plugin indent on |
OlderNewer