- node 環境で csv write したいときのやつ
- nextjs (express) の response と組み合わせて streaming 返却で利用した
import type { NextApiRequest, NextApiResponse } from 'next'
$ npm i react-plotly.js plotly.js
$ npm i -D @types/react-plotly.js
import React from 'react'
$ npm i qrcode.react
import { QRCodeSVG } from 'qrcode.react'
$ npm i mathjs
import { mean } from 'mathjs'
- svg ファイルを react component として使えるやつ
- afterInjection から描画後の node 操作が可能
- src の svg ファイルから width, height を読み取って viewBox 指定までやってくれるので、中に svg やら html (foreign object) やら nest してやれば resize 時に全体がよき感じに縮尺される
$ npm i react-svg
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 Phaser from 'phaser' | |
import { ReactNode, useEffect, useRef, useState } from 'react' | |
import { createPortal } from 'react-dom' | |
const PHASER_CONFIG = { /* ... */ } | |
const WIDTH = 1920 / 2 | |
const HEIGHT = 1080 / 2 | |
const LEFT = (screen.width - WIDTH) / 2 | |
const TOP = (screen.height - HEIGHT) / 2 |
- react で open window するやつ
- createPortal を使っているらしい
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
/** | |
* @link https://parashuto.com/rriver/development/img-size-attributes-are-back | |
*/ | |
import { Image } from '@chakra-ui/react' | |
export const myComponent = () => ( | |
// chakra image には元々 max-width: 100%; height: auto があたってる | |
<Image | |
src={'/some-large-image.png'} |
- flask 作者の all in one な python の package manager
- pyenv 的な python 自体の version 管理も機能として含んでる
- まだ実験的なリリースだが、かなり使用感はよく、本番利用も全然イケそうに見える
- venv + pip-tools を裏手で動かして、project ごとの python 仮想環境を透過的に管理するイメージ
NewerOlder