岡竜之介のブログ

岡竜之介のブログです。

Yosemite National Park - Part 1

ヨセミテ国立公園に行ってきましたよ!!!
I visited Yosemite National Park!!!


3年くらい前のマックOSのバージョンの名前が「Yosemite」でしたね。それです。
The name of a version of Mac OSX was "Yosemite". That's it.


でっかい岩山がドーンとあるキレイな背景画像が印象的でした。
The background image with a huge rock was impressive.


Windowsユーザーの方は知りません。
I don't care about Windows users.



そんなヨセミテ国立公園に一泊二日で行ってきたのでその辺の報告をします。
I went on a trip for two days to Yosemite National Park.


ブラジル、ブラジル、韓国、日本の4人。どうやったら実現するんだって感じの組み合わせですね。
4 people from Brazil, Brazil, Korea and Japan. I wonder how this combination realized.

行き方 How to go there


車で行きました。
We went by car.


メンバーの一人が車を持っていたので、それを使いました。
One of us had a car and we used it.


サンフランシスコから車で3時間ほど飛ばすと、ヨセミテ国立公園の入り口に着きます。
You can get from San Francisco to the entrance of Yosemite National Park in about 3 hours.


道中の景色。日本では見れなそう。北海道ならありそう。
Sceneries on the way. It doesn't seem to be seen in Japan. There may be it in Hokkaido.
f:id:agajo:20161121120838j:plain
f:id:agajo:20161121120843j:plain



この景色は日本でも見れそうですね。
This kind of scenery can be seen in Japan.
f:id:agajo:20161121120846j:plain


行程 Journey

Groveland


ここグローブランドは、ヨセミテ国立公園に入る前の最後の拠点です。
Globeland is the last base before entering Yosemite National Park.


ここのスーパーマーケットで食料などを補給し、公園内に入ると良いです。
You can buy something you need such as foods.

f:id:agajo:20161121120903j:plain


ヨセミテ国立公園はめちゃくちゃ広いので、入り口についたからと行って目的地に到着したわけではありません。
Because Yosemite National Park is huge, arriving at the entrance doesn't mean arriving at the destination.


入り口からさらに車で一時間ほど運転して、最初の目的地に向かいます。
We had to drive for a hour more to the first destination.


Mariposa Grove


まず向かったのはマリポーザグローブ。
We went to Mariposa Grove.


ここでは推定樹齢1900-2400年の超巨大なジャイアントセコイアを見ることが出来ます。
You can see Giant Sequoias, whose age are about 1900 - 2400 years old.


一番有名な木はグリズリージャイアントという名前らしいです。
The most famous tree's name is Grizzly_Giant.


それは是非見たい!!!!!
I want to see it!!!!



マリポーザグローブに向かう途中で、ゲートのような場所があって、係員がいました。
There was a gate on the way to Mariposa Grove and there was an employee.

「君たちどこへ行くの?」
"Where are you going?"

「マリポーザグローブに行きたいんですが。」
"We want to go to Mariposa."

「マリポーザグローブは閉鎖中だよ。」
"Mariposa is closed."



…なんだって!?!?
....What!?!?!?!?



いや嘘だろ〜〜〜〜〜
You must be kidding〜〜〜〜


Mariposa Grove of Giant Sequoias - Yosemite National Park (U.S. National Park Service)
f:id:agajo:20161121115955p:plain



本当でした。
That was true.


f:id:agajo:20161121121549j:plain



仕方ないので、また1時間運転して次の目的地に向かいます。
We had to go to the next destination by driving for an hour.


マリポーザグローブに行ってきた人のブログ記事があったので紹介しておきます。
I've found an article about Mariposa Grove (Japanese article).
ヨセミテ国立公園〜セコイアの木(マリポーサグローブ) | moko-sat.com ブログ

Bridalveil Fall


f:id:agajo:20161121122334j:plain

El Capitanがよく見えます。
It's El Capitan.

El CapitanもMac OSX の名前でしたね。
El Capitan was also the name of Mac OSX.

f:id:agajo:20161121122342j:plain

こちらはBridalveil Fall。ブライダルベールに見える…??
This is Bridalveil Fall. It looks like bridal veil......??


そしてこの滝を含む川の名前はブライダルベール川らしいです。アホみたいな名前ですね。
Well, the name of the river contains this fall is Bridalveil River. Interesting.

Tunnel View


続いて向かったのが、トンネルビューと呼ばれる場所。
The next destination was a place called "Tunnel View".


トンネルの近くにあるからトンネルビューです。
Because there is a tunnel near there, it's Tunnel View.


ここからは、エルキャピタンとハーフドームとブライダルベール滝がよく見えて最高です。
You can see El Capitan, Half Dome and Bridalveil Fall. It's amazing.

f:id:agajo:20161121123041j:plain
us

f:id:agajo:20161121123045j:plain
Half Dome

f:id:agajo:20161121123049j:plain
Bridalveil Fall

f:id:agajo:20161121123053j:plain
El Capitan


Yosemite Village


ヨセミテ国立公園の中で拠点となるのが、このヨセミテビレッジです。
This Yosemite Village is the base in Yosemite National Park.



ビジターセンターやスーパーマーケットがあり、観光以外の用は大体ここで済ませることが出来ます。
There is a visitor center and a supermarket, and for something other than sightseeing it can be done here generally.


f:id:agajo:20161121130606j:plain



1日目夜〜2日目については、Part 2へつづく。
About day 1 night and day 2, to be continued...

解答は覚えてるのに問題を思い出せない!!!!

浪人時代に先生に出された問題に、次のようなものがありました。


ただし、僕があまり覚えていないので、覚えている部分だけを書きます。


よく覚えていない部分は、「??」で埋めておくことにします。


AとBの2人で、次のようなゲームを行う。
??個の石を、次のルールに従ってAから順に交互に取り合う。
・直前の相手の番に相手が取った石の数以下の石しか取ることが出来ない。
・?????(他にルールがあったかどうか覚えていない)
????した方を勝ちとする。

このゲームはAかBどちらの必勝か。また、必勝法を説明せよ。



いや、かなり重要な所抜けとるやないか!!!!と思うと思うんですけど


解答をある程度覚えてるんですよ。


その解答はこうです。

n,mは自然数。さらに、nは奇数。
相手が n*2m 個の石を取ったら、
自分は 2m個の石を取る。
これを繰り返せば必ず勝てる。

だったんです。


直前の相手の石の個数と、次の自分の石の個数の関係は、次のような感じ。
相手→自分 として

1→1
2→2
3→1
4→4
5→1
20→4
96→32

ここから、元の問題を復元できます…?

BART and Caltrain


サンフランシスコにある主な公共交通機関は主に次の三種類です。
Public transportation in San Francisco are mainly following three.


Muni
BART
Caltrain



このうちMuniについては以前書きました。
I've already written about Muni.(Only Japanese)
agajo.hatenablog.com


サンフランシスコ市内を移動するなら、基本的にこのMuniで事足ります。
Muni is enough to move around only in San Francisco.



でも、もう少し遠くへ行く必要があるときには、Muniではたどり着けません。
However, you can't reach farther places by Muni.


そこで登場するのが、BARTとCaltrainです。
Then, you can use BART and Caltrain.

BART


MuniやCaltrainとくらべて、一番日本の電車のイメージに近いのがこのBARTです。
BART is the closer thing to the image of Japanese train than Muni and Caltrain.


SFO空港と繋がっているので、日本から旅行に来た場合も利用する機会はありそうです。
As it is connected to the SFO airport, there are likely to be opportunities to use when traveling from Japan.


Muniでは空港まで行けません。
Muni is not connected to the airport.

乗り方 How to get on

Clipper Card さえ持っていれば、日本の交通ICカードとまったく同じ乗り方で乗れます。
You can get on the BART by the same way as Japanese IC card.


乗る時と降りる時に改札にタッチすればOK。
Touch the ticket gate when riding and getting off.


現金でチケットを買って乗る方法を知りたい方は、僕はわからないので別途ググってください。
Those who would like to know how to buy tickets by cash, please google it.




Caltrain


サンフランシスコから南の方へ、BARTよりもさらに遠く、スタンフォードシリコンバレーまで行きたい場合は、このCaltrainを使います。
If you want to go to the south, such as the Stanford University or Silicon Valley, you should use Caltrain.




Commuters getting off Caltrain all at once


Caltrainはとにかくでかい!!!
Caltrain is really big!


全車両2階建てです。
All the cars have two floors.


架線がないので、電車ではないですね。ディーゼル車か何かでしょう。
Because there is no overhead wire, it is not a train. It is a diesel car or something.



日本の電車は一両目にもお客さんが乗り込むことが出来ますが
You can get on the first car of Japanese train


このタイプは一両目は動力車専用で、ここにはお客さんは乗りません。
But about Caltrain, the first car is the powered vehicle and you can't get on.


蒸気機関車なんかをイメージしてもらえればいいと思います。
I think that you should imagine the steam locomotive.




僕はこれに乗って Rakuten USA とスタンフォード大学に行きました。
I visited Rakuten USA and the Stanford University by Caltrain.




楽天の様子。
Rakuten USA.


agajo.hatenablog.com


乗り方

Caltrainも、BARTと同じく、距離で値段が決まるので、ClipperCardを乗る時と降りる時の2回タッチします。
You should make your Clipper Card touch the gate when getting on and off, because the price depends on the distance like BART.



サンフランシスコの駅はこんな感じ。
San Francisco Station.



それ以外の駅はこんな感じでだだっ広いです。
Other Stations.


この機械に Clipper Card をタッチします。
Touch Clipper Card to this machine.


改札はありません。
There is no gate.


現金でチケットを買って乗る方法を知りたい方は、僕はわからないので別途ググってください。
Those who would like to know how to buy tickets by cash, please google it.





以上!!
That's all!!!!!

サンフランシスコの地形

以前、サンフランシスコの気候の話をしましたが、今回は地形の話。
I talked about the climate of San Francisco before, but this time it is about the topography.



サンフランシスコと言えば、とにかく「坂が多い」ことで有名です。
San Francisco is famous fot that there are many steep slopes.


それをなんとかするためにケーブルカーなんてものが設置されたわけですしね。
That's why there are cable cars.


あ、気候についてはこちらです。(Only Japanese)
Oh, about the climate, read this (Only Japanese)
agajo.hatenablog.com

坂や丘 Slopes and Hills

Russian Hill


サンフランシスコには坂や丘が多くあります。
There are many slopes and hills in San Francisco.


agajo.hatenablog.com
こちらはロンバードストリート。坂が急すぎるので、クネクネと距離を伸ばして角度を軽減させてるわけですね。
This is Lombard Street. The slope is too steep, so they bend the road and extend the distance to reduce the angle.


このロンバードストリートは、"ロシアンヒル"という名前の丘に位置しています。
This Lombard Street is on "Russian Hill".



ロシアンヒルを登る階段。
Stairs to Russian Hill.


階段上からの景色。
The scenery from the top of the stairs.



Filbert Street のめちゃくちゃ急な坂。
Very steep slope on Filbert Street.



ロシアンヒルはその名の通り丘なので、頂上からどっちを向いても景色が良いです。
Because Russian Hill is a hill, you can see beautiful site in every direction.



コイトタワー。コイトタワーが建っている丘は「テレグラフヒル」と呼ばれています。
Coit tower, which is on "Telegraph Hill".



ゴールデンゲートブリッジ。
Golden Gate Bridge.



アルカトラズ島が見えますね!
You can see Alcatraz!!



このロシアンヒルのすぐ南には、ノブヒルという丘があります。この辺はもともとデコボコなんですね。
There is "Nob Hill" in the south of Russian Hill. The topography of this neighborhood is irregular.

何故坂が多いのか Why There Are So Many Slopes?

環太平洋造山帯 The Pacific Ring of Fire


まず一つ思いつくのは、「環太平洋造山帯」です。
One thing that comes to mind is the "The Pacific Ring of Fire".



太平洋を取り囲むようにある山がちな地形のことで、これに該当するエリアは地形がボッコボコです。
The Ring of Fire is a major area in the basin of the Pacific Ocean where a large number of earthquakes and volcanic eruptions occur.(from Wikipedia)


日本もその一部ですね。サンフランシスコも同じく環太平洋造山帯に属しています。
Japan and San Francisco are in The Pacific Ring of Fire.


地震地殻変動も多いので、こうした丘が形成されたと考えられます。
Because there are also many earthquakes and crustal movements, it seems that these hills were formed.




そしてもう一つ。
One more.

道の作り方 Road laying method


サンフランシスコは、自然発生した集落ではありません。
San Francisco is not a natural settlement.



ゴールドラッシュ時代にわあああっと人がきて一気に都市としての仕組みが整えられた都市で
It is a city where a lot of people came in the gold rush days and the structure as a city was prepared at once.


はじめから計画的に道や集落が作られています。
From the beginning, roads and communities are plannedly created.


その時に、碁盤の目状に縦横に平行・直角に道を作った結果
At that time, a road was created in parallel / perpendicular


丘などの地形をすべて無視することになったんですね。
They ignored the hills.


結果、丘があろうがお構いなしに道を突き通すことになったので
As a result,


急峻な坂が多くなった…
There are many steep slopes in San Francisco ...


……という内容が、このTogetterまとめに書いてありました。
........ I saw it in this summary website.
togetter.com


もっとまともなソースを知ってる方は教えてください。
If you know a better information source, please tell me that.



以上!!!!
That's all!!!!

岡竜の住み家その2 San Francisco Public Library. My Habitat 2.

多分、僕がサンフランシスコで一番利用してる施設ですね。
It is the facility that I am using most in San Francisco.


あらゆる観光地よりも頻繁に行っているw
I go there more often than all the sight spot.



何をしているかというと、数学の勉強をしたり、このブログの記事を書いたりしてます。
I study mathematics, write an article on this blog and so on.


うん。
yes.


まあなんというかその。
Well...



日本でも出来るね。
I can do it even in Japan.



ちなみに住み家その1はこちら。
About My Habitat 1, read this. (only in Japanese)
agajo.hatenablog.com



San Francisco Public Library

その名の通り、公共の図書館です。
As its name suggests, it is a public library.


サンフランシスコのメインライブラリーが一つと、それ以外にもいくつかのブランチがサンフランシスコのあちこちにあります。
There is one main library and several other branches around San Francisco.



これはメインライブラリー。
This is the main library.



こちらはサンセットブランチ。サンセット地区にある派生図書館ということですね。
This is the Sanset Branch. It's in the Sanset District.


サンセットブランチはあまり大きくないです。平屋です。
The Sanset Branch is not big. It's a "Hiraya".


「平屋」というと日本の住宅が思い浮かびますが、1階部分しかないのでこれも平屋ですよね。
"Hiraya" reminds us of a Japanese house, but it's cetainly "Hiraya" because this has only one floor.


いや、確か地下があったな。地下があっても平屋なんだっけ?忘れたwwwww
No, there might be a basement floor. Is it "Hiraya" if it has a basement floor? I'm not sure lololol

Main Library

こちらがメインライブラリー。僕が住んでいるのはここです。
This is the main library. I live in this.


誰でも入れます。入り口で何かをチェックされることもありません。
Everyone can enter it. Nothing is checked at the entrance.



入り口に屈強なセキュリティがいますが、その人は出る時に持ち出しアラームを鳴らした人を引き止めるためにいるので
Although there is strong security at the entrance, that person is to hold the person who took out the alarm when taking out



入る時は特に何も言われません。
That man does not say anything particularly when entering.




場所 Place

シビックセンター」と言われるエリアにあります。
This is in the area called "Civic Center".


シティホールやUNプラザなど、公共施設があるエリアですね。でかい広場もあります。
There are public facilities such as City Hall and UN Plaza. There is an open space, too.


大統領選挙期間中のシティホール。広場にて撮影。
City Hall during the presidential election. I took this the open space.


図書館の出入り口のすぐ近くにはmuniとBARTの「シビックセンター駅」があります。
There is a Civic Center station of MUNI and BART near the entrance of the library.

この階段を降りると駅。
The station is downstairs.

中 Inside


図書館の中は非常に綺麗です。中央には大きな吹き抜け。
It's very clean. In the center is a big stairway.

階段かエレベーターでフロアを移動できます。
You can change the floor by elevators or stairs.




日本語の本が置いてあるエリア。選ぶ基準はよくわかりません。
There are some Japanese books. I don't know the criteria to choose.




漫画コーナー。こちらは英語です。
Mangas. These are in English.



駅に近い側の出入り口。その日の営業が終わるタイミングで図書館を出てから撮ったので、夜です。
Entrance near the station. I took this picture when the library is closing. That's why it's dark.



ということで、図書館の紹介でした。
Then, I've introduced the library.


「いいよ図書館なんて。もっと観光地紹介しろよ。」と思うかもしれませんが
You might think "You don't need to introduce a library. Tell me about sight spots."


語学学校に通ってる日本人とかも結構利用してるみたいなので、
Japanese people who go to language schools use the library.


サンフランシスコでの暮らしの一端として紹介する価値はあるでしょう!!!
It will be worth introducing as part of San Francisco's living!



2泊3日とかで旅行に来る人は、来る必要はないと思います!!!!!
People who come to travel on 3 nights do not need to come!

UnityのGoogleCardboard用デモをNexus5で動かすまで I made a demo for Google Cardboard work on my Nexus5

f:id:agajo:20161116100918p:plain


UnityのGoogleCardboard用デモをNexus5で動かすまでだけで3日くらいかかったんですよ。
It took about 3 days to make a demo work on my Nexus5. The demo is for Google Cardboard on Unity.


自分が雑魚過ぎて情けないですね。
My ability is low and I am miserable.



How will I see this message hundreds more time before I can see the cube floating in the air on this smartphone?



I have no idea.... What's going on with GoogleUnityActivity...?


ちなみにこの記事は今これを書いてる2016年11月15日前後にしか役に立たないはずです。
By the way, this article should be useful only around November 15, 2016 writing this now.



数ヶ月もすれば、公式アップデートにより解決することでしょう。
A few months later, it will be resolved by official update.

症状 What's happening

Googleの公式ドキュメントに書いてあることを淡々と進めただけなのに、
I just made progress on what I saw in the official Google document,


Android実機(Nexus 5)に向けてBuildすると、直ちにクラッシュする。
but after building for the Android real machine (Nexus 5), it immediately crashes.



結論 Solution


いきなり結論です。こういう「情報を伝える」タイプの記事は結論が先にある方がいいんです。
It is a sudden conclusion. In an article of the type that conveys information like this, it is better to have a conclusion first.

Daydream technical preview を使わない Do Not Use Daydream technical preview

Unity+Google Cardboard開発メモ(Daydream対応) - フレームシンセシス(Japanese website)

こちらのページに「ただし、現時点ではDaydream非対応端末でのパフォーマンスに問題があるようです。」とあるように、
As mentioned in this page "However, it seems that there is a problem with the performance on the daydream incompatible terminal at the moment"


Daydream technical preview版のUnityを使ってDaydream非対応端末向けに開発をすると、失敗するようです。
It seems to fail if you develop for daydream incompatible terminals using Daydream technical preview version of Unity.


通常版を使う方法も併記してあるので、そちらの方法で試した所、うまくいきました。
The method to use the regular version is also included, and it worked out well.

Unityは普通に再インストールしただけで大丈夫でした。
It was okay just to reinstall Unity normally.


試したこと What I tried

Virtual Reality Supported を cardboardだけにする Choose Only "cardboard" in "Virtual Reality Supported"

Build時のPlayer Settingsの中にある「Virtual Reality Supported」という項目です。
It is the item "Virtual Reality Supported" in Player Settings when it is builded.


Daydream technical preview版を使っていると設定できます。
You can choose this if you use Daydream technical preview.


が、ダメ。OculusにしようがDaydreamにしようがcardboardにしようが解決せず。
However, it didn't work. Choosing Oculus or Daydream didn't work, neither.

SDKのバージョンを変えてみる Change the version of the SDK

[Unity] アプリをビルドしてandroid実機上でテストする | Unity 3DCG

こちらのページに書いてあった方法…をやったつもりですが、もはや効いたのか効いてないのかよくわからなくなってしまった。
I intended to do the method that was written on this page ... but I do not know well whether it is effective or not.



最終的にはこうなってる。
It's finally like this.

f:id:agajo:20161116131920p:plain


一度Android Studio用のプロジェクトファイルを書出し、Android Studio経由でビルドする Once you write the project file for Android Studio and build it via Android Studio

Unity CardBoard SDKを使った簡単なVRアプリ開発 in Android | Tech Blog - リクルート住まいカンパニー

こちらのページに書いてあった方法ですが、効かず。
Although it is the method written on this page, it does not work.

原因の掘り下げ Drill down on causes


Android Studio とかいうのを使ってエラーメッセージを確認した所、
I confirmed the error message using Android Studio.

java.lang.ClassNotFoundException: Didn't find class "com.google.unity.GoogleUnityActivity"

が原因だということがわかりました。
It's the cause.


このActivityとかいう奴が、僕が動かそうとしてるDemoだとGoogleUnityActivityなんですが
The demo I want to make move uses "GoogleUnityActivity",


Daydream対応版のUnityを使うとUnityPlayerActivityになっていて、
but Unity of Daydream version uses "UnityPlayerActivity".

「GoogleUnityActivityなんて見つかりませんよ!」というエラーが出る。
Then, it says "I can't find GoogleUnityActivity!!!!"


ということっぽい。ということまでわかりましたとさ!!!!
This is what I found!! That's all!!!


そのうちこのDemoの方もUnityPlayerActivityに対応して、この記事は価値を失っていくことでしょう。(2016/11/15)
In the meantime, this Demo will correspond to the UnityPlayerActivity. This article will lose value. November 15, 2016

Macの容量を空ける!Get more space on the Mac storage!!

f:id:agajo:20161115054848p:plain


ぎゃあああああああああああ
Aaaaaaaaaa




残り容量が、ほとんどないいいいいいいいいい
There is little remaining capacity


このMacは僕が休学してた夏に買ったものなので、4年と1クォーターほど使ってるものです。
I bought this Mac in the summer I was off. It is four years and one quarter ago.




SSDなので容量が小さいことは覚悟していたのですが、いよいよいっぱいになってきましたね。
Since it is SSD, I was prepared to have small capacity. It is finally becoming full.


まあ4年も使えばそうなるか。長く保ったほうだろ。
It will be so if used for 4 years. It can be said that it kept it long enough.


この容量を、空けよう!!!!!
Let's make more of this capacity!



ということで、今回は、この記事に実際に書き込みながら、リアルタイムに作業を進めていきたいと思います。
So I would like to continue working while writing to this article.



リアルタイムに公開はしないから、読む人は一気に読むわけだけどね!!
Because it does not publish in real time, readers read in one stroke though! !



準備 Preparation

外付けHDDを用意しました。
I prepared an external HDD.


f:id:agajo:20161115061933p:plain


…外付けHDDもそこそこいっぱいなのかよ。
...The HDD is also almost full....


パーティションが切ってあって、半分はバックアップ「Time Machine」に当ててあります。
It's divided into 2 partitions. One of them is for "Time Machine".


残りの半分は、ほとんど動画ですね。
The other one has movies.


鏡はどうして左右が逆転するのかを、わかりやすく一発解説|オブジェクション!の提案【ユーチューバー】

これ僕らの動画です。
It's our movie.


こういうのの素材動画が全部入ってるので、重いです。
There are stock videos here. heavy.


つーか、この"Time Machine"の方にこのMacの中身がまるまるバックアップされてるはずだから
In "Time Machine", there must be the whole data of the Mac.


このMacの方はほとんどまるまる消しても大丈夫なんじゃね?
Can't I delete most data in the Mac?


そういうの自動的にやってくれないのかな。
And, can't it do it automatically?

ちょっとわからんわ。
I don't know.


とりあえず、作業を開始しよう。
Let's begin.

仮説①動画や写真や音楽などが容量を圧迫している

Assumption 1. Movies, Pictures and Musics occupy the storage.


f:id:agajo:20161115054848p:plain


これを見ればわかるんですけど、この仮説は間違ってますね。
As you can see, this assumption is not correct.


Others って何だよ!!!!!!!
What are "Others" !!!!!


いや確かにPhotosとAudioとMovies合わせて10GBくらいあるけど、先に攻めるべきはこのOthersでしょう。
It is true that Photos, Audio and Movies are about 10GB, but I should process "Others" first.

仮説②過去にインストールしたいろいろな開発環境が容量を食っている

Assumption 2. The sizes of development environments that I installed in the past are large.


多分これだと思うんですよね。
I think it's true.


この4年間にこのMacにはいろんなものをインストールしました。
I installed a lot of things in this Mac for the past four years.


PHPとかCakePHPとかOctaveとかHaskell(GHC)とかPython2.7とかPython3.5とかRとかRStudioとかXQuartsとか。
PHP, CakePHP, Octave, Haskell(GHC), Python2.7, Python3.5, R, RStudio, XQuarts, etc...


そういうのが蓄積してるんじゃないかな。
I think they are accumulating.


それもHomebrewで入れたり、同じ奴を独立に入れたりして、多分もうぐっちゃぐちゃだと思うんですよね。
Some times I used Homebrew, and I installed the same thing without Homebrew.


もはや brew doctor や brew update すら正常に動かないもん。
Commands like "brew doctor" and "brew update" don't work.

Macに作ったいらないアカウントを消す

Remove the accounts from the Mac


研究とか就活をする時に、作業スペースを分けようと思ってそれ用のアカウントをMac上に作ったんですよ。
I made these accounts when I did my research and when I was finding a job in order to divide the work spaces.


そのアカウントから何かをインストールした結果、権限関係がめちゃくちゃになってます。
I've installed things by these accounts. As a result, the relationship of permissions is messed up.


なのでそれを消します。
Let's delete these accounts.


f:id:agajo:20161115064231p:plain


容赦なくいきましょう。
no mercy.


f:id:agajo:20161115064505p:plain

お、ちょこっと空いた。
I was able to empty a little



多分これでHomebrewが動かせるだろう。そしたらいらないものをアンインストールしていこう。
I think Homebrew works now. After that, let's uninstall unnecessary things.

brew update 

をして…
and...


f:id:agajo:20161115070340p:plain



はい、動かない。
OK. It doesn't work.

地道に一つずつ確認していく

Check files one by one.


結局、これしかないですね。
This is the only way.

easyramble.com


このやり方を参考に、何が容量を食ってるか調べていこう。時間かかるけど。
Let's examine which file size is large referring to this method. It takes time though.

sudo du -sh /*

結構時間がかかるので待ちます。1時間くらい?
It takes time and I have to wait for about an hour.

22G	/Applications
 10G	/Library
  0B	/Network
6.7G	/System
 46G	/Users
 26G	/Volumes
2.5M	/bin
  0B	/cores
4.5K	/dev
4.0K	/etc
1.0K	/home
4.0K	/installer.failurerequests
1.0K	/net
175M	/opt
6.7G	/private
1.0M	/sbin
4.0K	/tmp
3.3G	/usr
4.0K	/var
4.0K	/ユーザ情報

なるほど。(他にも謎のメッセージがガンガンでたけど、無視してます。)
I see. (There were other messages, but I ignored them.)


まずはUsersから攻めていこう。
Let's attack "Users" first.

sudo du -sh /Users/*
557M	/Users/Shared
 45G	/Users/username
sudo du -sh /Users/username/*
4.0K	/Users/username/-help
 44M	/Users/username/Applications
4.6M	/Users/username/Creative Cloud Files
 16M	/Users/username/Creative Cloud Files (archived) (1)
 12M	/Users/username/Desktop
6.7G	/Users/username/Documents
1.8G	/Users/username/Downloads
 31G	/Users/username/Library
1.0G	/Users/username/Movies
1.6G	/Users/username/Music
2.0G	/Users/username/Pictures
8.0K	/Users/username/Public
148M	/Users/username/Sites
4.0K	/Users/username/leksah.lkshs
4.0K	/Users/username/leksah.lkshw
 20K	/Users/username/line-log
1.9M	/Users/username/octave

Documentsは僕の普段の作業フォルダです。ここに手をいれるとなると、いよいよちゃんと1つずつ見ていかなきゃいけないので一旦放置。
"Documents" is my working folder.


手をいれるべきは、Libraryですね。
I should attack "Library".


以下同様に、一番大きなフォルダを順に掘り下げていくと…
Similarly, as I dig down the biggest folder in order ...

sudo du -sh /Users/username/Library/Application\ Support/Adobe/Common/*
  0B	/Users/username/Library/Application Support/Adobe/Common/Anywhere Cache
820K	/Users/username/Library/Application Support/Adobe/Common/Media Cache
 16G	/Users/username/Library/Application Support/Adobe/Common/Media Cache Files
 44K	/Users/username/Library/Application Support/Adobe/Common/MediaCoreQTCodecRulesCC 2014.xml
 48K	/Users/username/Library/Application Support/Adobe/Common/MediaCoreQTCodecRulesCC 2015.xml
 44K	/Users/username/Library/Application Support/Adobe/Common/MediaCoreQTCodecRulesCC 2018.xml


ア…アドビだ……アドビのキャッシュだ…
A...Adobe.....Adobe cache....


キャッシュと名のつくものは消していい気がするけど、一応中身を確認。
I think I can delete "cache" folder, but let me check it first.


…とここでエラー。
Error.

sudo du -sh /Users/username/Library/Application\ Support/Adobe/Common/Media\ Cache\ Files/*
sudo: unable to execute /usr/bin/du: Argument list too long


引数が長すぎるらしい。cdで移動して、中身を確認すると…
Argument list is too long. Let me change the current directly by "cd".





プライバシーのアレで見せられませんが、大量のファイルが出てきました。
There were a lot of files. I can't show you them because of my privacy.


タイトルも見覚えがある。
These titles are familiar.


なるほど。動画編集するたびにここにキャッシュがたまっていってたんだな。
I see. Every time I edited a video they were cached here.


まあキャッシュだし、消して大丈夫だろう!!
I think I can delete cache files!!

sudo rm -R ./*

※pwdで現在地を確認して万全の注意を払って削除。
※Use pwd and check where you are before "rm".


f:id:agajo:20161115080847p:plain


おお〜〜。やるじゃん。
Good.



以下、そんな感じで容量のでかいものを調べながら消していきました。
In the same way, I extinguished while examining the large capacity.

2.4G	./Users/username/Library/Application Support/Steam

steamじゃん〜〜 Her Storyというゲームをプレイしていたのですが、もう終わったので削除。
steam. I played "Her Story". I can delete this because it's done.

Removing and Reinstalling Steam on a Mac - Mac Issues - ナレッジベース - Steam Support

2.1G	./Users/username/Library/Caches/Google Earth

GoogleEarthのキャッシュでかいな。削除。
Google Earth's cache files are large. delete.




Applicationsは容量食ってるけどなかなか消せないな〜
Applications are large, but I can't delete these...



Garage Bandの楽器の音のファイルは消せないな〜
Garage Band Instrumental Files aren't able to be deleted...



フォントも消せないな〜
I can't delete Font files, neither...

2.0G	/System/Library/Caches/com.apple.coresymbolicationd

こんなの怖くて消せないよ〜
This file looks important...




…とかやって結局…
And...



f:id:agajo:20161115091548p:plain


う…うん…。
ah, ok...


まあ、そこそこ空いた、かな…。
I think it's not so bad...


Adobe Premiere で動画編集するとキャッシュファイルがガンガン貯まるんですね。
Adobe Premiere stores cache files so much.


消しちゃったけど大丈夫かな。
I've deleted them. Is it ok?



ということで。
OK.



でかい動画や音楽や写真をあまりパソコンに入れないように使ってきたので、いざいっぱいになると容量を空けるのが大変でした。
Because I used this computer without saving large files such as movies and musics, It was difficult to get back the capacity.


次にいっぱいになったらいよいよ細かいもの一つ一つ消していかないと厳しいだろうな。
It will be more difficult next time.


ちなみにこれだけ空けるだけで4時間くらいかかってます。容量の大きなファイルを調べ、それが何か調べ、消していいか調べ…とやらなきゃいけないので大変ですね。
It took about 4 hours. Checking which file is large, what is it and whether I can delete it or not. It was tough.



And writing this article in English took 1 or 2 hours lol


追記 Addition

f:id:agajo:20161115110839p:plain
再起動したら結構空いた。
After restarting Mac, I got more.