Skip to content

Instantly share code, notes, and snippets.

View maechabin's full-sized avatar
:octocat:
Focusing

Takanori Maeda maechabin

:octocat:
Focusing
View GitHub Profile
@azu
azu / TypeScriptの設定の良し悪し.md
Last active April 1, 2024 10:23
TypeScriptの設定の良し悪し

tsconfig.json の設定についてのメモ書きです。

Node.jsのバージョンごとの設定

target は 変換後のコードのECMAScriptバージョンを指定する たとえば、Node.js 14はES2020をサポートしている。そのため、Node.js 14向けのコード(サーバなど)ならtarget: "ES2020"を指定することで、余計なTranspileが省かれててコードサイズや実行時間が最適化される。

非破壊 TypeSctript

mizchi / TypeScript Meetup 2


About

  • mizchi / 竹馬光太郎
  • フロントエンドと Node.js
import { map, redirect, route } from 'navi'
function UpdatePasswordForm({ submitErrors }) {
return (
<Form
method='post'
submitErrors={submitErrors}
validate={value =>
value.password !== value.passwordConfirmation &&
{

deno のコードを読んだメモ。

そこまで大きなプロジェクトでもないので、rust と cpp そこまで習熟してなくても読めるだろうという気持ち。

ブートプロセス

https://denolib.gitbook.io/guide/installing-deno

起動プロセスっぽいところ。

@azu
azu / README.md
Last active March 15, 2024 09:59
スタートアップ/企業の調べ方
@yelouafi
yelouafi / algebraic-effects-series-1.md
Last active February 24, 2024 16:03
Operational Introduction to Algebraic Effects and Continuations

Algebraic Effects in JavaScript part 1 - continuations and control transfer

This is the first post of a series about Algebraic Effects and Handlers.

There are 2 ways to approach this topic:

  • Denotational: explain Algebraic Effects in terms of their meaning in mathematics/Category theory
  • Operational: explain the mechanic of Algebraic Effects by showing how they operate under a chosen runtime environment

Both approaches are valuables and give different insights on the topic. However, not everyone (including me), has the prerequisites to grasp the concepts of Category theory and Abstract Algebra. On the other hand, the operational approach is accessible to a much wider audience of programmers even if it doesn't provide the full picture.

<div id=root />
<script type=module>
import React from 'https://dev.jspm.io/react@16'
import ReactDOM from 'https://dev.jspm.io/react-dom@16'
ReactDOM.render(
React.createElement('h1', null, 'hello'),
document.querySelector('#root')
)
</script>
@sebmarkbage
sebmarkbage / The Rules.md
Last active May 13, 2024 06:47
The Rules of React

The Rules of React

All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.

What Functions Are "Pure"?

A number of methods in React are assumed to be "pure".

On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.

@sys9kdr
sys9kdr / Puppeteerがクローリングに使えるかも.md
Created December 16, 2017 18:03
Puppeteerがクローリングに使えそう

この記事はWebスクレイピング Advent Calendar 2017の17日目の記事です。puppeteerでクローリングします。

Google Chrome(Chromium)でクローリングをやる

SPAみたいなちょっと凝ったWebサイトをクローリングするときは一昔前はSelenium + PhantomJSあたりが鉄板でしたが、今後はSelenium + Headless ChromeもしくはPuppeteer + Headless Chromeが主流となっていく見通しです。 (HeadlessとはGUIアプリケーションのGUIを介さないモードのことです。)

前者についてはWeb上に情報も多いですが、Puppeteerでクローリングする話をそんなに見ない気がするのでクローリングの歴史を踏まえてやってみます。

一昔前のクローリング