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 id = 1; | |
(function loop (children) { | |
var nextChildren = []; | |
_.map(children, function (child) { | |
child.uid = child.name + '-' + id; | |
if (child.children && child.children.length > 0) { | |
nextChildren = nextChildren.concat(child.children); | |
} | |
id += 1; | |
}); |
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 uniq (arr1, arr2) { | |
var result = arr1.concat(arr2) | |
, len = result.length; | |
for (var i = 0; i < len; i++) { | |
var firstIdx = result.indexOf(result[i]) | |
, lastIdx = result.lastIndexOf(result[i]); | |
while (firstIdx !== lastIdx) { | |
result.splice(lastIdx, 1); | |
len = len - 1; |
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
.ds-meta, | |
#ds-thread #ds-reset .ds-powered-by { | |
display: none; | |
} | |
#ds-thread #ds-reset .ds-sort a.ds-current, | |
#ds-thread #ds-reset .ds-sort a:active, | |
#ds-reset .ds-highlight, | |
#ds-thread #ds-reset .ds-login-buttons .ds-more-services { | |
color: #069 !important; |
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 _ = require('underscore') | |
, iconv = require('iconv-lite'); | |
var codes = [214,247,210,170,190,205,202,199,207,235,202,212,202,212,184,248,212,219,195,199,188,196,208,197,202,177,181,216,214,183,191,201,210,212,208,180,181,195,182,224,188,242,194,212,161,173,161,173]; | |
var str = _.map(codes, function (code) { | |
return String.fromCharCode(code); | |
}).join(''); | |
console.log(iconv.decode(new Buffer(str, 'ascii'), 'gbk')); |
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
Handlebars.registerHelper("debug", function(optionalValue) { | |
console.log("Current Context"); | |
console.log("===================="); | |
console.log(this); | |
if (optionalValue) { | |
console.log("Value"); | |
console.log("===================="); | |
console.log(optionalValue); | |
} | |
}); |
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
"jshint_options": | |
{ | |
"bitwise": false, | |
"camelcase": true, | |
"curly": true, | |
"eqeqeq": true, | |
"indent": 2, | |
"plusplus": true, | |
"undef": true, | |
"unused": 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 githubList = [ | |
{ | |
name:'系统基础库', | |
list: [ | |
{name:'Category/Util', | |
list: [ | |
{name:'sstoolkit', owner:'soffes', desc:'一套Category类型的库,附带很多自定义控件 功能不错~'}, | |
{name:'BlocksKit', owner:'pandamonia', desc:'将Block风格带入UIKit和Founcation'}, | |
{name:'cocoa-helpers', owner:'enormego', desc:'一些Cocoa的扩展 2年前的工程'}, |
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
# 终端中输入下面命令来打开 Chrome | |
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --winhttp-proxy-resolver |
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
{ | |
"groups": {}, | |
"dials": { | |
"0": { | |
"id": 1, | |
"title": "Twitter", | |
"url": "https://twitter.com/", | |
"thumbnail": "", | |
"ts_created": 1381809640, | |
"visits": 18, |
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
{"whiteKeywords":[],"blackKeywords":[],"grayKeywords":[],"URLKeywords":[],"sourceKeywords":[],"sourceGrayKeywords":[],"userBlacklist":["1706976420"],"tipBackColor":"#FFD0D0","tipTextColor":"#FF8080","readerModeIndex":false,"readerModeProfile":false,"readerModeWidth":"750","readerModeBackColor":"rgba(100%, 100%, 100%, 0.8)","mergeSidebars":true,"floatSidebar":true,"unwrapText":true,"directBigImg":true,"directFeeds":false,"showAllGroups":true,"showAllMsgNav":true,"noDefaultFwd":true,"noDefaultGroupPub":true,"clearDefTopic":true,"overrideMyBack":false,"overrideOtherBack":false,"backColor":"rgba(100%, 100%, 100%, 0.2)","overrideMySkin":false,"overrideOtherSkin":false,"skinID":"skinvip001","filterOthersOnly":true,"filterPaused":false,"filterSmiley":false,"filterPromotions":true,"filterDeleted":true,"filterFeelings":true,"filterTaobao":false,"filterDupFwd":false,"maxDupFwd":"1","filterFlood":false,"maxFlood":"5","updateNotify":true,"autoSync":true,"floatBtn":true,"useCustomStyles":true,"customStyles":".WB_global_na |
OlderNewer