Thanks a ton for coming down to my talk, folks <33z. Your energy was amazing. This page has a few extra resources for you.
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
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); |
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
/* | |
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/ | |
*/ | |
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} |
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
cd /tmp | |
pecl download memcache | |
tar xzf memcache-2.2.6.tar | |
cd memcache-2.2.6 | |
phpize | |
MACOSX_DEPLOYMENT_TARGET=10.7 CFLAGS='-O3 -fno-common -arch i386 -arch x86_64' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64' ./configure --with-php-config=php-config | |
make | |
sudo make install |
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
/* | |
* 'rem' is a Sass mixin that converts pixel values to rem values for whatever property is passed to it. | |
* It returns two lines of code — one of the regular pixel values (for IE), and another with the | |
* converted rem values (for everyone else). Special thanks to Chris Epstein (http://chriseppstein.github.com) | |
* and Martin Bavio (http://martinbavio.com) for the help and code! | |
* | |
* Sample input: | |
* .element { | |
* @include rem('padding',10px 0 2px 5px); | |
* } |
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
输入tengine合并的URL: | |
<br/><br/> | |
<textarea id="J_tengineUrl">http://g.assets.daily.taobao.net/??malitx/card/1.0.5/c/global/global.css.js,malitx/card/1.0.5/p/index/index.css.js,tbc/m-loading/1.0.1/index.js,malitx/card/1.0.5/c/loading/m-loading/loading.css.js,malitx/card/1.0.5/c/loading/m-loading/index.js,malitx/card/1.0.5/c/loading/loading.css.js,malitx/card/1.0.5/c/loading/index.js,malitx/card/1.0.5/p/index/index.jst.js,malitx/card/1.0.5/p/index/model.jst.js,malitx/card/1.0.5/p/index/prestores.jst.js,malitx/card/1.0.5/c/spa/view-base.js,mtb/lib-windvane/1.4.7/windvane.cmd.js,tbc/km-toast/1.0.2/index.js,malitx/card/1.0.5/c/util/index.js,malitx/card/1.0.5/p/index/init.js,malitx/card/1.0.5/p/index/index.js</textarea> | |
<br/><br/> | |
<input type="button" value="转换为非合并的script/style代码" id="J_button" /> | |
<br/><br/> | |
<textarea id="J_textarea"></textarea> |
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
# editorconfig文件定义一致的code style规范 | |
# 根据不同的开发IDE或编辑器统一代码风格 | |
# 详情见 editorconfig.org | |
root = true | |
## 除了jade文件以外,全部以4个空格作为tab | |
[*] | |
end_of_line = lf |
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
# editorconfig文件定义一致的code style规范 | |
# 根据不同的开发IDE或编辑器统一代码风格 | |
# 详情见 editorconfig.org | |
root = true | |
## 文件新建除JS外使用GBK,JS文件使用utf-8 | |
[*] | |
end_of_line = lf |
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
# Output Directory | |
OUTPUT = build | |
all: css html js | |
css: | |
@echo "scss => css" | |
@compass \ | |
compile |
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
// easing functions http://goo.gl/5HLl8 | |
Math.easeInOutQuad = function (t, b, c, d) { | |
t /= d/2; | |
if (t < 1) { | |
return c/2*t*t + b | |
} | |
t--; | |
return -c/2 * (t*(t-2) - 1) + b; | |
}; |
OlderNewer