Skip to content

Instantly share code, notes, and snippets.

@yuheiy
yuheiy / tokens.json
Last active May 1, 2023 22:53
Default config for Tailwind CSS in Figma Tokens format
{
"sizing": {
"0_5_": {
"value": "0.125rem",
"type": "sizing"
},
"1_": {
"value": "0.25rem",
"type": "sizing"
},
@yuheiy
yuheiy / export-to-static.sh
Created July 21, 2021 16:26
Export a static site from your local WordPress environment using https://github.com/devjam/boilerplate-wordpress
#!/bin/bash
set -e
# reconfigure for building
unprocessed_config_content="$(cat .wp-env.json)"
jq ".config.SCRIPT_DEBUG=false" .wp-env.json > .wp-env.json.tmp
mv .wp-env.json.tmp .wp-env.json
.it-MdContent .highlight pre span {
background-color: transparent !important;
font-weight: normal !important;
}
.it-MdContent .highlight .c,.it-MdContent .highlight .ch,.it-MdContent .highlight .cm,.it-MdContent .highlight .cp,.it-MdContent .highlight .cpf,.it-MdContent .highlight .c1,.it-MdContent .highlight .cs,.it-MdContent .highlight .gu {
color: #9dabae !important;
}
.it-MdContent .highlight .k,.it-MdContent .highlight .kc,.it-MdContent .highlight .kd,.it-MdContent .highlight .kp,.it-MdContent .highlight .kr,.it-MdContent .highlight .kt,.it-MdContent .highlight .no {
@yuheiy
yuheiy / focus-visible.scss
Last active May 4, 2020 12:08
focus-visible Sass mixin
// :focus-visible Polyfill
// https://github.com/WICG/focus-visible
/**
* Apply declarations only if selectors match `:focus-visible`.
*
* Usage:
*
* @include focus(".Button") {
* outline: 3px solid blue;
import 'wicg-inert'
import React from 'react'
import ReactDOM from 'react-dom'
import noScroll from 'no-scroll'
declare global {
interface Window {
requestIdleCallback: (callback: (deadline: any) => void) => number
cancelIdleCallback: (handle: number) => void
}
@yuheiy
yuheiy / 定型的なリンクのラベルについて詳しく見る.txt
Created March 30, 2019 14:03
定型的なリンクのラベルについて詳しく見る
定型的なリンクのラベルについて詳しく見る
 商品や記事などの要素を一覧と詳細パターンで定型的に発生することがあるラベル
  すべて見る
  すべて表示
  もっと見る
  さらに見る
  さらに表示
  詳細を見る
  詳細を表示
  さらに詳しく
@yuheiy
yuheiy / 16.md
Last active December 17, 2018 06:29
TKG Advent Calendar 2018

ご飯パックのご飯に卵とタラコを乗せた。あまりおいしそうな写真は撮れなかった。

飯をおいしそうに撮るための努力をしてこなかった末路。

昨日スーパーで見たタラコがおいしそうだった。でもすでに寿司を食う気分だったので見送っていた。なので今日改めてタラコを買ってきた。ついでに卵も家になかったので卵コーナーを見ていたら、温泉卵がパック入りの生卵と同じノリで売られていたので、なんとなく物珍しい気がしてそれにした。コンビニでは普通に売ってるのでスーパーに置いてても不思議ではない。行く頻度はコンビニの方が多いのでいまいち「置いてそう感」を感じる力が養えていないのかもしれない。

一人暮らしを始めたころからしばらくは割とがんばって自炊をしていた。毎日米を炊いて料理を作っていた。それが確か2年目くらいからはもう嫌になった記憶がある。東京に引っ越したときに再開してみようかと思ってちょっとがんばってみたけど、せいぜい2週間くらいで終了した。ほとんど外食で済ませるようになった。

家から出るのがめんどくさいと思うことは割と頻繁にあるので、そういうときは家に蓄えたご飯パックにふりかけを降って食べたりしている。米を炊くというのは実際なかなかめんどくさい。いつからか思い切ってご飯パックを試してみたら思いの外僕の生活様式にフィットした。長らく愛用している。割り箸を買っておけば洗い物も出ない。そういえば洗い物というのは本当にめんどくさい。調理直後の人として勢いがある状態で無になって取り組まなければ下手すると数週間放置してしまう。寒い時期なんかは本当に厳しい。

@yuheiy
yuheiy / .gitignore
Last active October 31, 2018 14:10
formatToRelativeTime
node_modules
let id = 0
class Parent extends React.Component {
state = {
focusRequestId: null
}
requestFocus = () => {
this.setState({ focusRequestId: ++id })
}
// assets path
@function assets($path) {
@return url("../#{$path}");
}
@function image($path) {
@return assets("images/#{$path}");
}