ã¯ããã«
ä»åã¯åæ©ã®åæ©ã«æ»ããPCã®ç°å¢æ§ç¯ãèšè¿°ããŠãããŸãã
ãªãã§ãã®èšäºãæžãããšãããšããPCãå€ãããšãã«ç°å¢æ§ç¯ã«æéã䜿ããããªãããïŒã
ããããå°±è·ããPCãå€ããå¯èœæ§ãããã®ã§ãã®æ®µéã§è¿·ãæéãæžãããããèšè¿°ããŠãããŸãã
â»åå¿è
ã®æ¹ãæåã«èŠãŠãåããããããã説æã亀ããªããèšè¿°ããŠãããŸããïŒïŒïŒMacéå®ïŒ
â»ããã«æžããŠããããšã¯èŠããªããŠããã§ããäžåºŠèšå®ããã°ã次ã«äœ¿ãã®ã¯åœåå
ã®ããã
ããã¹ããšãã£ã¿
ãŸãã¯ããã¹ããšãã£ã¿ããæºåã
ããã¹ããšãã£ã¿ãšã¯ãæç« äœæãç·šéããããã®ãœãããŠã§ã¢ãéçºãè¡ãéãããã¹ããšãã£ã¿ã«ã³ãŒããæžã蟌ã¿ãŸãã
æ§ã
ãªçš®é¡ãããã®ã§ãããç§ã¯å§ãã«progateãšãããã€ã³ã¹ããŒã«ïŒã©ã¡ãããªã³ã©ã€ã³åŠç¿ãµã€ãïŒã§äœ¿çšããŠããVSCode
ãšãããšãã£ã¿ã䜿çšããŠããŸãã
VSCode
ãã€ã¯ããœãããéçºããç¡æã§å©çšã§ããããã¹ããšãã£ã¿ããšã³ãžãã¢ã«ã¯äººæ°ãé«ãïŒ
â»æªçµéšã§ãŸã åŠç¿æ®µéã®ãšã³ãžãã¢ã®èæã§ãããåŠç¿ãµã€ãçã§ãã»ãšãã©ãVSCodeã䜿çšããŠããå°è±¡ãªã®ã§ãããã¹ããšãã£ã¿ã¯ããã§ééããªãããšæããŸãã
äžèšãªã³ã¯ããããŠã³ããŒãããŸãïŒ
VSCodeããŠã³ããŒãããŒãžãªã³ã¯
ããŠã³ããŒãåŸã®æµã
â ãªã³ã¯ãéãããDownload for Macãã¯ãªãã¯
â¡Google Chromeã®å Žåãç»é¢å·Šäžã«ããŠã³ããŒããããã¡ã€ã«ã衚瀺ãããã®ã§è¡šç€ºããããã¡ã€ã«ãã¯ãªãã¯
â¢ãã¡ã€ã«ãå±éãããVSCode.appã衚瀺ãããã®ã§ã¢ããªã±ãŒã·ã§ã³ãã©ã«ãã«ãã©ãã°ïŒãããã
â£å¿
èŠãªæ¹ã¯Dockã«ãã©ãã°ïŒããããã§é
眮
â€ã¢ããªã±ãŒã·ã§ã³ã®ã¢ã€ã³ã³ãã¯ãªãã¯ããèµ·åã§ãããå®æâ
æ¡åŒµæ©èœ
ããã¹ããšãã£ã¿ã«å°å ¥ããæ¡åŒµæ©èœã玹ä»ããŸãã
- Japanese Language Pack for Visual Studio CodeïŒè±èªãèŠæãªååŠè
å¿
é ïŒ
æ¥æ¬èªè¡šèšã«ãã - HTML Snippets
HTMLã¿ã°ãCSSã¿ã°ã®å ¥åãè£å®ãã - Ruby
Rubyã®æ§æããã§ãã¯ããééã£ãç®æãææãã - zenkaku
å šè§ã¹ããŒã¹ãç¥ãããïŒååŠè å¿ é ïŒ - Code Spell Checker
ã³ãŒãã®ã¹ãã«ããã§ãã¯ãã
åã å¿ èŠã«å¿ããŠå°å ¥ããŸãããã
å°å ¥æ¹æ³
1.èµ·åãããŠã£ã³ããŠç»é¢å·ŠåŽã®ãã¢ã€ã³ã³ã¡ãã¥ãŒå
ã«ããåè§ã®ã¢ã€ã³ã³ãã¯ãªãã¯
2.å·Šäžã®ãSearch Extensions in Marketplaceãã«æ¡åŒµæ©èœã®ååãå
¥å
3.衚瀺ãããæ¡åŒµæ©èœãéžæããinstallïŒãŸãã¯ã€ã³ã¹ããŒã«ïŒãã¯ãªãã¯ãã
4.å³äžã®Restart Nowãã¯ãªãã¯ããŠåèµ·åãããšãèšå®ãåæ ããã
ããã¹ããšãã£ã¿ã®ã«ã¹ã¿ãã€ãº
æ¡åŒµæ©èœä»¥å€ã«ããå
ã
èšå®ã§ãããã®ãã«ã¹ã¿ãã€ãºããããšã§ãããããã¹ããšãã£ã¿ã䜿ããããããŸãã
ä»åã¯ä»¥äžã®2ç¹ãå°å
¥
- åè§ã¹ããŒã¹ã®èšå®
- ãªãŒãã»ãŒãèšå®
åè§ã¹ããŒã¹ã®èšå®
ã³ãŒãã®çžŠåãæããïŒã€ã³ãã³ãïŒããéã¯åºæ¬çã«tabããŒ
ã䜿çšããŸãã
äŸãã°2åã®åè§ã¹ããŒã¹ãå
¥ããå Žåãã¹ããŒã¹ããŒã2åæŒããŸãããtabããŒãåè§ã¹ããŒã¹2ã€åãšèšå®ããŠããã°ãtabããŒã1åå
¥åããã ãã§è¯ããªããŸããå¿
é ãªå¹çåã§ãïŒ
èšå®æé
1.VSCodeã®ãµã€ãããŒãããã管çïŒäžéšã®æ¯è»ããŒã¯ïŒãâ ãèšå®ãã®é ã«éžæ
2.Editor: Tab SizeãïŒã«èšå®
3.Editor: Render Whitespaceã§ãallããéžæ
ãªãŒãã»ãŒãèšå®
äœãèšå®ããªãç¶æ
ã ãšã³ãŒããç·šéãããã³ã«commmand + s
ã§éœåºŠäžæžãä¿åããå¿
èŠããããŸããã³ãŒããç·šéãããã³ã«ãªãŒãã»ãŒãããããèšå®ããŸãã
èšå®æé
1.VSCodeã®ãµã€ãããŒãããã管çïŒäžéšã®æ¯è»ããŒã¯ïŒãâ ãèšå®ãã®é ã«éžæïŒçŽåã®äœæ¥ã«ç¶ããŠè¡ãæ¹ã¯ããã®æäœã®å¿
èŠã¯ãããŸããïŒ
2.ãªãŒãã»ãŒãã®èšå®ã§ãonFocusChangeããéžæ
ç°å¢æ§ç¯
ããããæ¬æ Œçã«ç°å¢æ§ç¯ããŠãããŸãã
ãŸãcontrolã㌠+ space
(ãããã¯commandã㌠+ space
)ãæŒããšãæ€çŽ¢ããŒã衚瀺ãããã®ã§ããã¿ãŒããã«ããšå
¥åããæ€çŽ¢çµæãšããŠåºãã¿ãŒããã«ã®ã¢ããªã±ãŒã·ã§ã³ãããã«ã¯ãªãã¯ããŠèµ·åããŸãã
ã¿ãŒããã«
ã¿ãŒããã«ã¯ãPCã«åœä»€ãããããšãã§ããã¢ããªã±ãŒã·ã§ã³ã
ç°å¢æ§ç¯ãå®è¡ããã«ã¯ã³ãã³ãã©ã€ã³
ãšããããŒã«ãå¿
èŠã«ãªãã®ã§ãããMacã«ããã©ã«ãã§ã€ã³ã¹ããŒã«ãããŠããã³ãã³ãã©ã€ã³ãã¿ãŒããã«
ã«ãªããŸãã
â»ã³ãã³ãã©ã€ã³ãšã¯ã³ã³ãã¥ãŒã¿ãŒã«å¯ŸããŠããŒããŒãããã³ãã³ããšããæåãæã€ããšã§æäœãè¡ãä»çµã¿ã
ã¿ãŒããã«ãéããã %ã®å³åŽã®æã1è¡ãã€ã³ããâãšã³ã¿ãŒ
# zshãããã©ã«ãã«èšå®
% chsh -s /bin/zsh
# ãã°ã€ã³ã·ã§ã«ã衚瀺
% echo $SHELL
# 以äžã®ããã«è¡šç€ºãããã°æå
/bin/zsh
ãããPassword for ***ïŒ
ãšè¡šç€ºããããPCã®ãã¹ã¯ãŒããå
¥åããŠãã ããã
Command Line Tools
Command Line Toolsãšã¯webã¢ããªã±ãŒã·ã§ã³éçºã«å¿
èŠãªãœãããŠã§ã¢ãããŠã³ããŒãããããã«å¿
èŠãªæ©èœã§ãã
ã¿ãŒããã«ã«ä»¥äžã®ã³ãã³ããå
¥åããŠCommand Line Toolsãã€ã³ã¹ããŒã«
% xcode-select --install
衚瀺ç»é¢ã«åŸãã€ã³ã¹ããŒã«âåæããâå®äº
Homebrew
ãœãããŠã§ã¢ç®¡çããŒã«ã
ãããå°å
¥ããåã«ç¢ºèªããªããã°ãªããªãããšããããŸãã
ç»é¢å·Šäžã®ãããããŒã¯ãããã®Macã«ã€ããŠãã¯ãªãã¯ã衚瀺ãããMacã®æ
å ±ã®ããã»ããµã«Intelãã®æåã衚瀺ãããŠããå Žåã¯ãã®ãŸãŸé²ããŠãã ãããïŒä»¥äžM1ã¢ãã«ã®å Žåã®èšè¿°ãé£ã°ããŸããããïŒ
â»M1ã¢ãã«ã®å Žå以äžã®æé ãå¿
èŠã«ãªããŸãã
â finderãéã
â¡å³äžã®æ€çŽ¢ããŒããã¿ãŒããã«ãšå
¥åãæ€çŽ¢
â¢å³ã¯ãªãã¯ã§æ
å ±ãèŠããéžæ
â£ãRosettaã䜿çšããŠéããã«ãã§ãã¯ãå
¥ããŠéãã
â€å床ã¿ãŒããã«ãå³ã¯ãªãã¯ãçµäºãéžæ
â¥ã¿ãŒããã«ãã¯ãªãã¯
âŠãããã¢ããã衚瀺ãããã®ã§ã€ã³ã¹ããŒã«ãã¯ãªãã¯
â§å®äºïŒ
Homebrewãã€ã³ã¹ããŒã«
# ããŒã ãã£ã¬ã¯ããªã«ç§»å
% cd
# ããŒã ãã£ã¬ã¯ããªã«ãããã©ãã確èª
% pwd
# ã³ãã³ããå®è¡
% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Password:ã衚瀺ããããPCã®ãã¹ã¯ãŒããå
¥å
==> You are usingããããšè¡šç€ºãããããšã³ã¿ãŒ
以äžã®ã³ãã³ãã§ã€ã³ã¹ããŒã«ã§ããŠããã確èªããŸãã
% brew -v
çµæâ
Homebrew 2.5.1ã#æ°åã¯ç°ãªãå Žåãã
ãšè¡šç€ºãããŠãããã€ã³ã¹ããŒã«ãããŠããŸãã
以äžã®ã³ãã³ãã§ã¢ããããŒã
% brew update
æš©éãå€æŽããŸã
% sudo chown -R `whoami`:admin /usr/local/bin
ããã§å®äºã§ãïŒ
MySQL
æåŸã«MySQLãããã¯ã¢ããªã±ãŒã·ã§ã³ã§ããŒã¿ã管çããããŒã«ã§ããããŒã¿ç®¡çã«ãæ§ã ãªçš®é¡ããããŸãããMySQLãæãããã¥ã©ãŒã§ãã
MySQLãã€ã³ã¹ããŒã«
% brew install mysql@5.6
å°ãæéãããããŸãã
å®äºãããèªåèµ·åèšå®ããããªããŸãã
% mkdir ~/Library/LaunchAgents
% ln -sfv /usr/local/opt/mysql\@5.6/*.plist ~/Library/LaunchAgents
% launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql\@5.6.plist
ãã®ã³ãã³ããæããªããšPCã®åèµ·åã®ãã³ã«èµ·åãçŽãå¿
èŠãã§ãŠããŸãã
ç¶ããŠã©ãããã§ãå®è¡ã§ããããã«èšå®
% echo 'export PATH="/usr/local/opt/mysql@5.6/bin:$PATH"' >> ~/.zshrc # mysqlã®ã³ãã³ããå®è¡ã§ããããã«ããèšå®
% source ~/.zshrc # èšå®ãèªã¿èŸŒãã³ãã³ã
% which mysql # mysqlã®ã³ãã³ããæãŠãã確èªãã
# 以äžã®ããã«è¡šç€ºãããã°æå
/usr/local/opt/mysql@5.6/bin/mysql
èµ·å確èª
% mysql.server status # MySQLã®ç¶æ
ã確èªããã³ãã³ã
# 以äžã®ããã«è¡šç€ºãããã°æå
SUCCESS! MySQL running
ç¶ããŠshared-mime-infoãã€ã³ã¹ããŒã«
% brew install shared-mime-info
% brew list
衚瀺ããããªã¹ãã®äžã«shared-mime-info
ãããã°å®æã§ãïŒ
ãç²ãããŸã§ããïŒïŒ
ããšã¯åã
èªèº«ã®PCã«å¿
èŠãªèšèªçãã€ã³ã¹ããŒã«ããŠãããŸãã
ä»ã®ç§ã®æ®µéã§ããšãRubyã»Railsã»Node.jsã»yarnãªã©ã«ããããŸãããããã¯äººã«ãããããªã®ã§ãäœãšãèšããªãã§ããã
çµããã«
ããPCãå€ãããšãã®ããã«ãšããããšã§èšè¿°ããŸããã
å®éã«å®åãçµéšãããŠãããšã³ãžãã¢ã®æ¹ã
ã¯ã©ããããã®ã¹ãã³ã§PCãè²·ãæããã®ãããã
ç§ã¯å
¥ç€Ÿãšåæã«è²·ãæ¿ãããïŒãšå¿ã®äžã§æã£ãŠããŸãã