[OSX Setup] n (nodejs): Permission denied

tl;dr # error on install n install 8.2.1 mkdir: /usr/local/n/versions/node: Permission denied mkdir: /usr/local/n/versions/io: Permission denied # create dir before install sudo mkdir /usr/local/n sudo chown -R $(whoami) $_ # then success n install 8.2.1 Ref: GitHub: Permission denied before running with sudo #416

Read More

Golang Error: invalid type for composite literal

In my case, the underlying type is not struct. // Device contains strings of the device name type Device string // NativeDevice stands for smartphone app(e.g. iOS/Android) type NativeDevice Device // AppleDevice stands for iOS device. type AppleDevice NativeDevice // Error pattern: using `struct type` for AppleDevice. func NewIPhoneDevice() AppleDevice { return AppleDevice{} // => Error: invalid type for composite literal. } // Corrent pattern: using `string type` for AppleDevice. func NewIPhoneDevice() AppleDevice { return “iphone” // use `string` } https://play.golang.org/p/cLSmvB4bZD2

Read More

Xiaomi Mi A1のSIMカードトレイの交換

旅行先でSIMカードトレイを無くしてしまったため、Parts4Repairで代わりのスペアを注文することにしました。 SIMカードトレイが$2.9, 送料が$3.53で、合計$6.43でした。 めちゃくちゃ安くてビビります。

Read More