Skip to content

Instantly share code, notes, and snippets.

View tacamy's full-sized avatar
:octocat:

tacamy tacamy

:octocat:
View GitHub Profile
@yomotsu
yomotsu / .css
Last active June 10, 2017 18:42
ja-font-family
@font-face {
font-family: xYuMincho;
font-weight: normal;
src: local( "YuMincho-Regular" ),
local( "Yu Mincho Regular" ),
local( "YuMin-Medium" ),
local( "YuMincho Medium" ),
local( "Yu Mincho" );
}
@yomotsu
yomotsu / gist:7e2ec401c1520d880308
Last active February 24, 2022 14:16
BEMが失敗しているパターンとその問題点

思いついたら足していく

名前にとらわれすぎ

BAD1

「コンポーネントのエレメントのエレメントのエレメントの...」として定義している

  <div class="v1-news">
@Takazudo
Takazudo / createSinglePipeRequestFn.js
Created June 17, 2014 11:32
createSinglePipeRequestFn.js
//===========================================
// API
app.api._createSinglePipeRequestFn = function(options) {
/*
options should have...
type: 'GET' // or 'POST'
url: '/blahblah/'
*/
return (function() {
var legacyIE = (function() {
var ua = navigator.userAgent;
var matchRes = ua.match(/msie\s?(\d+)/i);
// '.... MSIE 7.0; Windows....'
// => ["MSIE 7", "7"]
if(!matchRes) { return false; }
var version = matchRes[1];
@hokaccha
hokaccha / gist:951652
Created May 2, 2011 14:08 — forked from tacamy/gist:951646
JavaScript UA Navigator(Android+'Mobile')
if ((navigator.userAgent.indexOf('iPhone') !== -1 && navigator.userAgent.indexOf('iPad') === -1) || navigator.userAgent.indexOf('iPod') !== -1 || /Android.+Mobile/.test(navigator.userAgent)) {
location.href = '/hoge/';
}