確認環境: Ubuntu 16.04.1 LTS
|
1 2 3 |
$ sudo mv /etc/localtime /etc/localtime.org $ sude ln -s /usr/share/timezoneinfo/Asia/Tokyo /etc/localtime |
※ 再起動の必要なし
確認環境: Ubuntu 16.04.1 LTS
|
1 2 3 |
$ sudo mv /etc/localtime /etc/localtime.org $ sude ln -s /usr/share/timezoneinfo/Asia/Tokyo /etc/localtime |
※ 再起動の必要なし
|
1 2 |
$ xcode-select --print-path /Applications/Xcode.app/Contents/Developer |
|
1 |
$ sudo xcode-select --switch /Application/Xcode.app/Contents/Developer |
|
1 |
$ sudo xcode-select --switch /Application/Xcode8.1.app/Contents/Developer |
|
1 |
$ sudo xcode-select -r |
(App Storeから)Xcodeをバージョンアップしたあとは、このコマンドでCLIで参照するXcodeのパスを切り替えるのが簡単!
|
1 |
$ sudo xcode-select --install |
|
1 2 3 4 5 6 7 8 9 10 11 |
$ sudo cat /etc/hosts sudo: unable to resolve host MYHOSTNAME 127.0.0.1 localhost # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts |
|
1 2 3 4 5 6 |
$ git branch -a * master xyz remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/xyz |
|
1 2 3 4 |
$ git branch -r remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/xyz |
Java における byte[] と String の相互変換
|
1 2 |
String str = "Hello"; byte[] bytes = str.getBytes("UTF-8"); |
|
1 2 |
byte[] bytes = {72, 101, 108, 108, 111}; String str = new String(bytes, "UTF-8"); |
JavaScript (ECMAScript 6) の 分割代入 (Destructuring assignment)
|
1 2 3 4 5 6 7 |
const obj = {name:'Jane', age:18}; const {name:s, age:i} = obj; // s = 'Jane' ; i = 18 const {name, age} = obj; // name = 'Jane' ; age = 18 |
|
1 |
const {dialog} = require('electron').remote; |
以下のコードと等価
|
1 2 |
const remote = require('electron').remote; const dialog = remote.dialog; |
Visual Studio CodeをmacOSのコマンドライン(シェル)から起動可能にする設定

|
1 |
$ code readme.txt |
| 16進数表記 | 略語 | 英語 | 日本語 | エスケープ表記 |
|---|---|---|---|---|
| 0x0d | CR | Carriadge Return | 復帰文字 | \r |
| 0x0a | LF | Line Feed | 改行文字 | \n |
| OS | 改行コード |
|---|---|
| Windows | CR + LF |
| UNIX, macOS (OS X) | LF |
| Mac OS 9 | CR |
|
1 2 3 4 5 |
<<<<<<< HEAD printf("Hello"); ======= printf("Bye"); >>>>>>> |
XcodeのSchemeの設定が不適切だと実機デバッグで適切なロケールが選択されなかったり、[[NSLocale currentLocal] objectForKey:NSLocaleCountryCode]で適切なカントリーコードが取得できない(nilが返ってくる)
Xcode 7.3.1 のとき
Scheme => Edit Scheme
argumentsタブのArguments Passed On LaunchにリストアップしているAppleLanguage(xx)を全て削除する。