type Props = Partial<{
children: ReactNode;
type: ButtonHTMLAttributes<HTMLButtonElement>['type'];
disabled: ButtonHTMLAttributes<HTMLButtonElement>['disabled'];
tabIndex: ButtonHTMLAttributes<HTMLButtonElement>['tabIndex'];
onClick: (e: MouseEvent<HTMLButtonElement>) => void;
}>;
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
// [...Array(n)] という書き方が使える | |
[...Array(100)].forEach((_, i) => { | |
// 何らかの処理 | |
}) |
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
// Predefine list of available timing functions | |
// If you need more, tween js is full of great examples | |
// https://github.com/tweenjs/tween.js/blob/master/src/Tween.js#L421-L737 | |
const easings = { | |
linear(t) { | |
return t; | |
}, | |
easeInQuad(t) { | |
return t * t; | |
}, |
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
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 2 | |
indent_style = space | |
insert_final_newline = true | |
tab_width = 2 | |
trim_trailing_whitespace = true |
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
$font-family-sans-serif: Verdana, "游ゴシック", YuGothic, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; | |
$font-family-serif: "Times New Roman", "游明朝", YuMincho, "Hiragino Mincho ProN", Meiryo, serif; | |
//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`. | |
$font-family-monospace: Osaka-mono, "MS Gothic", monospace; | |
$font-family-base: $font-family-sans-serif !default; |
仮想マシン内にあるGitリポジトリのファイルをホストOS上のエディタで編集したいが、ホストOSから仮想マシン内のディレクトリを参照するシンボリックリンクを貼ることは出来ない。 ホストOS上にGitリポジトリを作成して、それに対して仮想マシン内からシンボリックリンクを貼ることは可能だが、仮想マシン内での実行速度が著しく低下するデメリットがあるのが問題。
rsync を使ってホストOSとゲストOS間でのファイル/ディレクトリの同期ができる(Vagrant v1.5から)。
vagrant up
、vagrant reload
、vagrant provision
、vagrant rsync
コマンドを実行すると指定したディレクトリ間での同期処理が行われる。
Vagrantfile
に以下のように記述する。
VirtualBox仮想マシンのネットワークはデフォルトでNATとなっている。
VirtualBox の場合、NAT ネットワークアダプタには 10.0.2.0/24 の IP アドレスが割り当てられ、ゲスト OS から見える ホスト OS の IP アドレスには 10.0.2.2
が設定される仕様。
したがってホストOS上に建てたサーバーにゲストOSからアクセスしたい場合は、http://10.0.2.2
とアクセスすれば普通に見ることができる。
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
# Created by newuser for 5.0.2 | |
# rbenv | |
eval "$(rbenv init -)" | |
# git code assist | |
fpath=($(brew --prefix)/share/zsh/site-functions $fpath) |
NewerOlder