- Rubygems 镜像 - 淘宝网 #ref
- Keys Repeat
defaults write -g ApplePressAndHoldEnabled -bool false#ref - Chrome Dev Version #ref
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 THRESHOLD = 150, DELAY = 15; | |
| function initBigArrayAsync(max, cb) { | |
| var r = [], i = 0; | |
| function init(startTime) { | |
| while (i < max) { | |
| if (new Date - startTime < THRESHOLD) { | |
| r[i++] = i; | |
| } else { |
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() { | |
| if (typeof define !== 'undefined') { | |
| return; | |
| } | |
| var win = window; | |
| var modules = { | |
| host: win | |
| }; |
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
| commodityImages.click(function(evt) { | |
| var cont = $(this), | |
| zoomIn = !cont.hasClass('zoom'); | |
| // should not use toggle function to prevent scroll rock | |
| if (zoomIn) { | |
| items.hide(); | |
| largeItems.show(); | |
| } else { | |
| items.show(); |
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 format(tpl, obj) { | |
| var key, reg; | |
| for (key in obj) { | |
| if (obj.hasOwnProperty(key)) { | |
| reg = new RegExp('\\{' + key.toUpperCase() + '\\}', 'g'); | |
| tpl = tpl.replace(reg, obj[key]); | |
| } | |
| } | |
| return tpl; | |
| } |
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 Event = (function() { | |
| 'use strict'; | |
| var gEvents = {}, | |
| uidCount = 0, | |
| ukey = '-douban-simple-event-uid', | |
| getEventsRepo = function(obj) { | |
| var uid, events; |
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
| .box { | |
| width: 240px; | |
| overflow: hidden; | |
| } | |
| .quote-wrap { | |
| display: inline-block; | |
| text-align: left; | |
| vertical-align: top; | |
| background: url("http://www.douban.com/pics/ilmen/commodity/quotel.png") no-repeat scroll left top transparent; |
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
| .box { | |
| width: 240px; | |
| } | |
| .quote-wrap { | |
| background: url("http://www.douban.com/pics/ilmen/commodity/quotel.png") no-repeat scroll left top transparent; | |
| font-size: 14px; | |
| line-height: 1.5; | |
| padding-left: 22px; | |
| text-align: justify; |
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
| ul { font-size:0; border-bottom: 1px solid #ccc; } | |
| ul > li { display: inline-block; font-size: 12px; border-bottom: 1px solid red; margin-bottom: -1px; } |
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
| .box { width: 240px; height: 200px; background: #ccc; } | |
| .box:hover h5 { text-decoration: underline; } |