Skip to content

Instantly share code, notes, and snippets.

View beijaflor's full-sized avatar

sho otani beijaflor

View GitHub Profile
%clearfix {
&::after {
content: "";
display: block;
height: 0;
clear: both;
}
}
@beijaflor
beijaflor / triangle.svg
Created January 20, 2016 02:25
▼.svg and its data URI
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAGAQMAAADJ1T3/AAAABlBMVEVMaXH/AAAkxJXwAAAAAXRSTlMAQObYZgAAABpJREFUeF5jmODCcP0Iw5YQhu0aDFM0GNgbADl+BZrSfARgAAAAAElFTkSuQmCC
  • Force a single domain
    • www有無をどちらかに統一(リダイレクト)
  • Prefer HTTPs over HTTP
    • HTTPSを使用する
  • Optimise for speed
    • スピードアップする
  • META tags: title & description
{
"scripts": {
"watch:js": "babel -w ./src/js/ --out-dir ./ --presets=\"es2015\"",
"build:js": "babel ./src/js/ --out-dir ./ --presets=\"es2015\"",
"serve": "browser-sync start --server --files=\"./*.html, ./*.js\"",
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"babel-cli": "^6.6.5",
@beijaflor
beijaflor / button.js
Last active September 26, 2016 14:50
React Storybook入門:コンポーネントカタログがさくさく作れちゃうかもしれないオシャレサンドボックス環境 ref: http://qiita.com/beijaflor/items/4fc01f8d557c1926c38d
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
storiesOf('Button', module)
.add('with a text', () => (
<button onClick={action('click')}>My First Button</button>
))
.add('with no text', () => (
<button></button>
));
@beijaflor
beijaflor / ショッピングカートの中身を見るボタン
Last active December 6, 2016 01:30
Font-Awesomeでアクセシビリティを確保しながらウェブフォントを活用する ref: http://qiita.com/beijaflor/items/88395c52804a06dbaccc
<a href="path/to/shopping/cart">
<i class="fa fa-shopping-cart" title="View 3 items in your shopping cart" aria-hidden="true"></i>
<span class="sr-only">View 3 items in your shopping cart</span>
</a>