This file contains 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模块。 | |
*/ | |
KISSY.add("aaaa", function ake() { | |
console.log('immediately'); | |
return function() { | |
console.log('later'); | |
return ake; | |
} |
This file contains 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
div { | |
background: | |
radial-gradient(black 15%, transparent 16%) 0 0, | |
radial-gradient(black 15%, transparent 16%) 8px 8px, | |
radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 0 1px, | |
radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 8px 9px; | |
background-color:#282828; | |
background-size:16px 16px; | |
} |
This file contains 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 ascii2native(str) { | |
return unescape(str.split('\\').join('%')); | |
} |
This file contains 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 | |
git filter-branch --env-filter ' | |
an="$GIT_AUTHOR_NAME" | |
am="$GIT_AUTHOR_EMAIL" | |
cn="$GIT_COMMITTER_NAME" | |
cm="$GIT_COMMITTER_EMAIL" | |
sn="目前的名字" |
This file contains 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
/** | |
* Typing animation with pure CSS. | |
* Works best in browsers supporting the ch unit. | |
*/ | |
@keyframes typing { from { width: 0; } } | |
@keyframes blink-caret { 50% { border-color: transparent; } } | |
h1 { | |
font: bold 200% Consolas, Monaco, monospace; |
This file contains 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 script = document.createElement('script'); | |
script.src="http://g.tbcdn.cn/kissy/k/1.4.4/seed.js"; | |
script.onload = function() { | |
KISSY.use("io, dom", function(S, IO, DOM) { | |
var rt = []; | |
S.each(document.querySelectorAll("span.num"), function(d) { | |
var tr = DOM.parent(d, 'tr'); | |
var num = d.innerHTML * 1; | |
var id = DOM.attr(DOM.get('.icn-del', tr), "data-res-id"); |