- レンタルサーバコントロールパネルからメールアドレスを新規追加
- ユーザ名は
wordpress
にする - ユーザ名とパスワードはプラグインの設定で入力する
- ユーザ名は
- WP Mail SMTP by WPFormsをインストール
- プラグインを設定する
- 送信元メールアドレス: wordpress@example.com
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
function HooksSeparator<T>({ | |
setup, | |
children, | |
}: { | |
setup: () => T; | |
children: (prop: T) => ReactNode; | |
}) { | |
return children(setup()); | |
} |
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
function App() { | |
return ( | |
<> | |
{(() => { | |
const [isOpen, setOpen] = useState(false); | |
return ( | |
<> | |
<Button onClick={() => setOpen(true)}>First</Button> | |
<Popover isOpen={isOpen} onOpenChange={setOpen}> | |
... |
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
import type { Dispatch, DispatchWithoutAction, ReactNode, SetStateAction } from 'react'; | |
import { useCallback, useState } from 'react'; | |
/** | |
* The implement a hooks version of React PowerPlug’s `<State />`. | |
* https://renatorib.github.io/react-powerplug/#/docs-components-state | |
* | |
* @example | |
* <State initial={false}> | |
* {({ state: isOpen, setState: setOpen }) => ( |
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
const plugin = require("tailwindcss/plugin"); | |
const autoGrid = plugin( | |
function ({ matchComponents, theme }) { | |
const values = theme("autoGrid.min"); | |
matchComponents( | |
{ | |
"auto-grid": (value) => ({ | |
display: "grid", |
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
{ | |
"sizing": { | |
"0_5_": { | |
"value": "0.125rem", | |
"type": "sizing" | |
}, | |
"1_": { | |
"value": "0.25rem", | |
"type": "sizing" | |
}, |
なんでもないようなことを書きたい。少し考えてみて、それが今の僕の求めているものだと気づいた。意味とか、理由とか、そういう目的ありきの思考パターンの外で、ただなにかを感じられるようになりたい。
僕は昔から、正しさを探していた。たぶん物心がついたくらいのころからしばらく、あらゆる物事には正しいやり方があり、唯一の答えがあるという世界認識をしていた。理屈っぽかったし、そこから逸脱することが気持ち悪かった。
なにかふざけたことをするときには、そのモードに入るためのスイッチを意識的に切り替えなければならなかった。オンかオフの2方向しかない、間のない機械的なメカニズム。しかしその先にも正しさからの逸脱はなく、今あるのとは別のもう一つの正しさの体系があるだけだった。
学校の課題で一番苦手なのは作文だった。どれくらいのものかと言うと、一文字も書けないまま数時間フリーズしてしまう程度には書けなかった。答えがいろいろあるということも理由の一つではあったが、いま考えると、自分がイメージできる正解の線が見つからなかったからだと思う。もちろん、一文字の綻びもない完全な解答が存在するとまでは考えていなかったが、それでも、こういう場合にはこういうことを書くもんだ、という正解パターンの型が常に存在するようには思っていた。
その型を見い出して実演できるだけの技量などは到底なかった。けれど完璧主義者の僕にとっては、不格好でもとりあえずやってみて60点の解答を目指すよりは、失敗の形跡を残さずに0点を出した方が自尊心を傷つけずに済んだ。当時、国語の成績はむしろ良い方だった。
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
<?php | |
// Implementation like lodash’s `sampleSize()` | |
// https://lodash.com/docs/4.17.15#sampleSize | |
function array_sample_size(array $array, int $size = 1) | |
{ | |
$size = min($size, count($array)); | |
$keys = array_rand($array, $size); | |
if (!is_array($keys)) { |
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
const plugin = require("tailwindcss/plugin"); | |
const rem = (px) => `${px / 16}rem`; | |
// https://www.smashingmagazine.com/2022/01/modern-fluid-typography-css-clamp/ | |
const getFluidSize = (minSize, maxSize, minWidth = 640, maxWidth = 1280) => { | |
const v = (100 * (maxSize - minSize)) / (maxWidth - minWidth); | |
const r = (minWidth * maxSize - maxWidth * minSize) / (minWidth - maxWidth); | |
return `clamp(${rem(minSize)}, ${v.toPrecision(3)}vw + ${rem(r.toPrecision(3))}, ${rem( |
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
// https://standard.shiftbrain.com/blog/default-action-for-click-event-of-a-element | |
import gsap from "gsap"; | |
import ScrollToPlugin from "gsap/ScrollToPlugin"; | |
import { forceFocus } from "./dom-utils"; | |
gsap.registerPlugin(ScrollToPlugin); | |
window.addEventListener( | |
"click", |
NewerOlder