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
/** | |
* CSS Overflow Test Script | |
* @author [email protected], @chenchengpro | |
* @doc http://www.chencheng.org/ | |
*/ | |
(function() { | |
// Text |
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 getBrowserInfo = function() { | |
// Ref: http://www.useragentstring.com/pages/useragentstring.php | |
var token = [ // 顺序有关 | |
"Opera", // 某些版本会伪装成 MSIE, Firefox | |
"Chrome", // 某些版本会伪装成 Safari | |
"Safari", // 某些版本会伪装成 Firefox | |
"MSIE 6", | |
"MSIE 7", | |
"MSIE 8", | |
"MSIE 9", |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: nginx init.d dash script for Ubuntu <=9.10. | |
# Description: nginx init.d dash script for Ubuntu <=9.10. | |
### END INIT INFO |
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
/* Thanks Flyosity! */ | |
/* Ref: http://vunction.com/blog/post/node-and-oauth-and-flickr-oh-my */ | |
pre::-webkit-scrollbar { | |
width: 8px; | |
height: 6px; | |
} | |
pre::-webkit-scrollbar-button:start:decrement, pre::-webkit-scrollbar-button:end:increment { | |
display: none; |
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() { | |
var count = 0; | |
if (!KISSY.one('#J_ListTable')) return; | |
KISSY.one('#J_ListTable').all('tbody.order').each(function(el, i) { | |
var oid = el.getDOMNode().id; | |
if (!oid) return; | |
if (el.one('a.J_MemoFlag').one('img').getDOMNode().src.indexOf('op_memo_0') > -1) { | |
return; | |
} |
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
KISSY.all('#J_Slide img').attr('src', 'http://img03.taobaocdn.com/tps/i3/T1ci8_XhXwXXXXXXXX-490-170.png'); |
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
'mail.google.com': function() { | |
var h = new Date().getHours(); | |
if (h > 10 && h < 18) { | |
document.body.innerHTML = '<div style="font:60px/1.5 arial;color:gray;text-align:center;margin-top:200px;">工作时间别老看邮件.</div>'; | |
} | |
} |
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 A = ['a1', 'a2', 'a3']; | |
var B = ['b1', 'b2']; | |
var C = ['c1', 'c2', 'c3', 'c4', 'c5']; | |
function combo(a, b) { | |
var ret = []; | |
var n = a.length; | |
var m = b.length; |
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
# | |
# @fileoverview 上传目录下的所有 torrent 文件到迅雷离线. | |
# @author ChenCheng <[email protected]> | |
# @ref https://github.com/iambus/xunlei-lixian | |
# | |
tmpdir="path/to/tmp/directory"; | |
script="path/to/xunlei-lixian/lixian_cli.py" | |
if [ ! -d "$tmpdir" ]; then |
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
#!/bin/bash | |
# Change this to the path to your icns file | |
ICON="$HOME/Sublime Text 2.icns" | |
cp -f "$ICON" "/Applications/Sublime Text 2.app"/Contents/Resources | |
cp -r "/Applications/Sublime Text 2.app" "/Applications/Sublime Text 2 copy.app" | |
rm -rf "/Applications/Sublime Text 2.app" | |
mv "/Applications/Sublime Text 2 copy.app" "/Applications/Sublime Text 2.app" |
OlderNewer