Skip to content

Instantly share code, notes, and snippets.

View yukikim's full-sized avatar
😵
It is busy

takayuki_kimura yukikim

😵
It is busy
View GitHub Profile
@yukikim
yukikim / sample.tsx
Created November 10, 2024 18:39
[tsx]sample_useReducer
import { useReducer } from 'react'
// reducerが受け取るactionの型を定義します
type Action = 'DECREMENT' | 'INCREMENT' | 'DOUBLE' | 'RESET'
// 現在の状態とactionにもとづいて次の状態を返します
const reducer = (currentCount: number, action: Action) => {
switch (action) {
case 'INCREMENT':
return currentCount + 1
@yukikim
yukikim / sample.tsx
Created November 10, 2024 18:31
[tsx]childrenを取る場合
//React.ReactNodeの指定
// Containerのpropsの型を定義します
type ContainerProps = {
title: string
children: React.ReactNode
}
// Reactコンポーネントの型付けに関しては、以下もご参照ください
// https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/function_components/
@yukikim
yukikim / info.md
Last active September 20, 2019 02:28
nginxインストール CentOS7
@yukikim
yukikim / info.md
Last active September 20, 2019 01:03
CentOS7 ポート開放について

利用可能サービスの確認

$ firewall-cmd --list-all

ポート開放

開放しているポートの確認

  • $ firewall-cmd --list-ports --zone=public

ポート開放

@yukikim
yukikim / index.html
Created July 19, 2019 06:14
Test Chart 3
<canvas id="myChart" width="400" height="400"></canvas>
@yukikim
yukikim / index.html
Created July 19, 2019 06:01
Test Chart 2
<canvas id="myChart" width="400" height="400"></canvas>