Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View t32k's full-sized avatar
:octocat:
Working from home

t32k t32k

:octocat:
Working from home
View GitHub Profile
.c-component {
color: green;
}
.c-component-s-subComponent {
color: green;
}
.c-component-m-modifer {
color: green;
}
.u-utility {
@t32k
t32k / iwate-html.md
Last active September 22, 2015 13:24

講演タイトルと概要

JavaScript/CSS 2015

まるでドッグ・イヤーのごとく変化するフロントエンド開発に疲れていませんか?本セッションでは、BabelやPostCSSの導入の仕方や使い方を解説することによって、次世代の標準仕様であるEcmaScript 6やCSS 3を先取りし、長く使える技術を身につけます。流れの速さに惑わされないようにしましょう。

プロフィール

石本 光司 (いしもと こうじ)

@t32k
t32k / gist:1018296
Created June 10, 2011 05:45
Google Analytics for jQuery Mobile
//set
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxx-x']);
//async
(function () {
var ga = document.createElement('script');
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
数を減らす
HTTPリクエストを減らす
ExpiresまたはCache-Controlヘッダーを追加する
DNSルックアップを減らす
リダイレクトを避ける
重複スクリプトを取り除く
Ajaxをキャッシュ可能にする
AjaxリクスとはGETを使用する
コンポーネントの後読みする
コンポーネントの先読みする
// Usage: @include sprites($map-tabs, common, true);
@mixin sprites($map, $map-item, $isCommon:false) {
@if $isCommon {
background-image: sprite-url($map);
background-size: round(image-width(sprite-path($map)) / 2) round(image-height(sprite-path($map)) / 2);
background-repeat: no-repeat;
} @else {
$pos-y: round(nth(sprite-position($map, $map-item), 2) / 2);
width: round(image-width(sprite-file($map, $map-item)) / 2);
height: round(image-height(sprite-file($map, $map-item)) / 2);
@t32k
t32k / gist:4593169
Last active December 11, 2015 11:19
Cancellation of last item border.
<ul class="listview has-line">
<li>foo</li>
<li>bar</li>
<li>baz</li> <!-- want to cancell this border -->
</ul>
// Log min and max info
function minMaxGzip(src) {
return src ? require('gzip-js').zip(src, {}) : '';
}
exports.minMaxInfo = function(min, max) {
var gzipSize = String(minMaxGzip(min).length);
grunt.log.writeln('Uncompressed size: ' + String(max.length).green + ' bytes.');
grunt.log.writeln('Compressed size: ' + gzipSize.green + ' bytes gzipped (' + String(min.length).green + ' bytes minified).');
};
@t32k
t32k / custom-sort-order.json
Last active December 20, 2015 02:49
test_custom_sort_order
{
"sort_order": [
"-webkit-flex-align",
"-moz-flex-align",
"-ms-flex-align",
"-o-flex-align",
"flex-align",
"overflow",
"-ms-overflow-x",
"-ms-overflow-y",
@t32k
t32k / adjective.md
Created July 25, 2013 12:49
使えそうな英語の形容詞

primary, secondary, tertiary, quaternary, quinary, senary, septenary, octonary, novenary, decenary

alph, beta, gamma, delta, epsilon, zeta, eta, theta, iota, kappa

loud, quiet, bare, positive, negative, firm, contrast, sharp, opaque, neutral, main, secondary, alert, success, highlight, shiny, dark