hasen's tech life

Twitter: @hasen

HomebrewでMySQLをupgradeした時に実行しておくコマンド.

# HomebrewでMySQLをupgradeした時に実行しておくコマンド.
# MySQLWorkbenckがエラーになる.

$ brew upgrade mysql
$ mysql_upgrade -u USER_NAME -p
> Enter password:
> Checking if update is needed.
> Checking server version.
> Running queries to upgrade MySQL server.
> Checking system database.
> mysql.server restart
> ... (中略)
$ mysql.server restart

gulpでエラーが出たので対応した.

# gulpでエラーが出たので対応した.

$ gulp
module.js:474
throw err;
^

Error: Cannot find module 'internal/fs'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at evalmachine.:17:20
at Object. (/PATH/TO/graceful-fs/fs.js:11:1)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:450:

$ rm -rf node_modules
$ npm i

VirtualBoxが入っていなかったので,インストールした.

# VirtualBoxが入っていなかったので,インストールした.

$ vg up
> ... (中略)
> If you believe you already have a provider available, make sure it
> is properly installed and configured. You can see more details about
> why a particular provider isn't working by forcing usage with
> `vagrant up --provider=PROVIDER`, which should give you a more specific
> error message for that particular provider.

$ virtualbox
> -bash: virtualbox: command not found

# VirtualBoxをサイト(https://www.virtualbox.org/wiki/Downloads)からダウンロードする.

$ vagrant up
> ... (省略)

platoでJavaScriptの静的解析をした.

# platoでJavaScriptの静的解析をした.

$ cd /usr/local/src
$ sudo curl -L git.io/nodebrew | perl - setup
> ... (省略)
$ echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bashrc
$ nodebrew install-binary stable
> ... (省略)
$ nodebrew list
> v7.1.0
>
> current: none
$ nodebrew use v7.1.0
> use v7.1.0
$ node -v
> v7.1.0
$ npm install -g plato
> ... (省略)
$ plato -r -d DIR -x .json -t "TEST_NAME" PATH/TO/JS_DIR/
> done!
$ open DIR/index.html

f:id:hasen-fus:20161117091150p:plain

CentOS6でFailed: npm.noarch 0:1.3.6-5.el6というエラーが出たので対応した.

# CentOS6でFailed: npm.noarch 0:1.3.6-5.el6というエラーが出たので対応した.

$ cat /etc/redhat-release
> CentOS release 6.8 (Final)
$ sudo yum install --enablerepo=epel -y nodejs npm
> ... (中略)
> Failed:
> npm.noarch 0:1.3.6-5.el6

$ sudo rm -rf /usr/lib/node_modules
$ sudo yum remove -y nodejs npm
$ sudo yum install --enablerepo=epel -y nodejs npm