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
nohup node server.js > /dev/null 2>&1 & | |
nohup means: Do not terminate this process even when the stty is cut off. | |
> /dev/null means: stdout goes to /dev/null (which is a dummy device that does not record any output). | |
2>&1 means: stderr also goes to the stdout (which is already redirected to /dev/null). | |
& at the end means: run this command as a background task. |
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
Luo Lei 罗磊 | |
Cheetah mobile | F2E | |
Mobile: (+86) 186-8882-3265 | QQ: 526020986 | Mail:[email protected] | |
Fuxing International Center,237 Chaoyang Bei Lu,Chaoyang District,Beijing,100020, China | |
猎豹移动 | 北京市朝阳区朝阳北路237号复星国际中心20层 猎豹移动(原金山网络) 用户体验部 |
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
var scrollTimeout = null; | |
document.addEventListener('scroll',function(event){ | |
clearTimeout(scrollTimeout); | |
scrollTimeout=setTimeout(function(){ | |
list.newViewedStat(); | |
},100); | |
}) |
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
var isWechat=false; | |
UA=navigator.userAgent.toLowerCase(); | |
if(UA.match(/MicroMessenger/i)=="micromessenger"){ | |
isWechat = true; | |
} | |
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
var wrap=document.getElementById('page'); | |
var contentHeight=wrap.offsetHeight; | |
var yOffset=window.pageYOffset; | |
var y = yOffset + window.innerHeight; | |
function autoRefesh(){ | |
wrap=document.getElementById('page'); | |
contentHeight=wrap.offsetHeight; | |
yOffset=window.pageYOffset; | |
y = yOffset + window.innerHeight; |
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
<style> | |
.intro{ | |
display: block; | |
height: 26px; | |
line-height: 26px; | |
width: 300px; | |
overflow: hidden; | |
position: relative; | |
} |
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://dopiaza.org/tools/datauri/index.php | |
比较转换后字符大小 http://bytesizematters.com/ | |
*/ | |
<style> | |
.dot { | |
background-image: url(data:image/gif;base64,R0lGODlhBAABAIABAMLBwfLx8SH5BAEAAAEALAAAAAAEAAEAAAICRF4AOw==); | |
*background-image: url(http://www.zhangxinxu.com/wordpress/wp-content/themes/default/images/zxx_dotted.gif); // IE6~IE7 | |
} |
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
theParent = document.getElementById("theParent"); | |
theKid = document.createElement("div"); | |
theKid.innerHTML = 'Are we there yet?'; | |
// append theKid to the end of theParent | |
theParent.appendChild(theKid); | |
// prepend theKid to the beginning of theParent | |
theParent.insertBefore(theKid, theParent.firstChild); |
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 httpGet(theUrl) | |
{ | |
var xmlHttp = null; | |
xmlHttp = new XMLHttpRequest(); | |
xmlHttp.open( "GET", theUrl, false ); | |
xmlHttp.send( null ); | |
return xmlHttp.responseText; | |
} |
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
<video id="video" controls="" preload="none" poster="http://media.w3.org/2010/05/sintel/poster.png"> | |
<source id="mp4" src="http://media.w3.org/2010/05/sintel/trailer.mp4" type="video/mp4"> | |
<source id="webm" src="http://media.w3.org/2010/05/sintel/trailer.webm" type="video/webm"> | |
<source id="ogv" src="http://media.w3.org/2010/05/sintel/trailer.ogv" type="video/ogg"> | |
<p>Your user agent does not support the HTML5 Video element.</p> | |
</video> |