放送で紹介する用。書きかけです。
ちょっと伸びたのでさらに追記。これは元々自分の勉強がてら書いていたもので、これを書く過程でどうしても自分の理解では説明できないところがあり koba789 に依頼してペアプロをしてもらった、という流れがあります。その結果が次の動画です。
生放送の流れを円滑にするために資料を公開しましたが、この記事は未完成で、あとでさらに整理して別途記事にまとめるつもりです
放送で紹介する用。書きかけです。
ちょっと伸びたのでさらに追記。これは元々自分の勉強がてら書いていたもので、これを書く過程でどうしても自分の理解では説明できないところがあり koba789 に依頼してペアプロをしてもらった、という流れがあります。その結果が次の動画です。
生放送の流れを円滑にするために資料を公開しましたが、この記事は未完成で、あとでさらに整理して別途記事にまとめるつもりです
hoge.example.com
でユーザが作成したサイトをホスティングして、任意のJavaScriptを実行できる状態にしたいケース。
サブドメインを分けることで、Fetch APIなどはSame Origin Policyを基本にするため、別のサブドメインや example.com
に対するリクエストなどはできなくなる。
一方で、CookieはSame Origin Policyではない。
デフォルトでは、hoge.example.com
から example.com
に対するCookieが設定できる。
これを利用したDoS(Cookie Bomb)やこの挙動を組み合わせた別の脆弱性に利用できる場合がある。
Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.
Sep. 27th 2021 UPDATED
Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:
Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.
tsconfig.json
の設定についてのメモ書きです。
target は 変換後のコードのECMAScriptバージョンを指定する
たとえば、Node.js 14はES2020をサポートしている。そのため、Node.js 14向けのコード(サーバなど)ならtarget: "ES2020"
を指定することで、余計なTranspileが省かれててコードサイズや実行時間が最適化される。
import React, { useEffect, useRef } from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { defineComponent, onMounted, onUnmounted } from '@vue/composition-api'; | |
import Vue from 'vue'; | |
export function vuenize(component: React.ComponentType, parentData: Vue.VNodeData = {}) { | |
const randomKey = 'key_' + Math.random(); | |
let mountedNode: any = null; | |
return defineComponent({ | |
name: component.name || component.displayName, |
This is an addition to my Vue.js Global 2020 talk about Vue 3 Reactivity. | |
Some people asked for the slides. You can find them here: | |
https://marcbackes.com/d8qaLT |
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
// Objectのvalueからなるunion型のエイリアス | |
type ObjectValueType<T> = T[keyof T]; | |
// 使い方 | |
const MyFood = { | |
Food1: "ラーメン", | |
Food2: "カツ丼", | |
Food3: "ビャンビャン麺", | |
} as const; |
// | |
// See: https://kentcdodds.com/blog/profile-a-react-app-for-performance#build-and-measure-the-production-app | |
// See: https://nextjs.org/docs/api-reference/next.config.js/custom-webpack-config | |
const TerserPlugin = require('next/dist/compiled/terser-webpack-plugin'); | |
module.exports = { | |
webpack: (config, options) => { | |
// | |
// Use profiler-enabled React builds |