-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom.xml
More file actions
3316 lines (2269 loc) · 187 KB
/
atom.xml
File metadata and controls
3316 lines (2269 loc) · 187 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[BEFOOL blog]]></title>
<link href="http://befool-inc.github.io/atom.xml" rel="self"/>
<link href="http://befool-inc.github.io/"/>
<updated>2013-10-07T02:01:17+09:00</updated>
<id>http://befool-inc.github.io/</id>
<author>
<name><![CDATA[8823-scholar]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[自分用のOS X設定 その3]]></title>
<link href="http://befool-inc.github.io/blog/2013/10/07/set-up-os-x-part-3/"/>
<updated>2013-10-07T02:00:00+09:00</updated>
<id>http://befool-inc.github.io/blog/2013/10/07/set-up-os-x-part-3</id>
<content type="html"><![CDATA[<p>森です。第1回にて<a href="http://befool-inc.github.io/blog/2013/08/12/set-up-os-x-part-1/">2つの記事に分けて記述します</a>といいましたが…まとめきれず3つ目の記事になってしまいました。</p>
<p>今回は <strong>Homebrew</strong> を用いて <strong>git</strong> . <strong>subversion</strong> , <strong>rbenv</strong> などなど自分の開発環境セットアップ方法をまとめます。</p>
<p>このまとめを書いている自分のMacは <strong>MacBook Air 11-inch Mid 2011</strong> 、 <strong>OS X 10.8.4</strong> です。
そのため他の機種、OSのバージョンではこのとおりの設定はできないかもしれませんのでご了承ください。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-12-set-up-os-x-part-1/my_os_x.png" alt="my OS X" /></p>
<!-- more -->
<h2>Homebrew</h2>
<p><a href="http://brew.sh/index_ja.html">Homebrew</a> とはMacのパッケージ管理ツールです。
最近は情報を探すときに Homebrew をやたら進められるので自分も乗っかっています。</p>
<p>他にも有名なパッケージ管理ツールには <strong>MacPorts</strong> がありますが自分はMac歴が浅くて使ったことがないのです…。</p>
<p>Homebrewのインストールは簡単です。ターミナルに下記コマンドを流すだけです。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>ruby -e <span class="s2">"$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"</span>
</span></code></pre></td></tr></table></div></figure>
<p>インストールは簡単にできましたが、使用するにはもう一手間必要で、 <em>Command Line Tools for Xcode</em> か <em>Xcode</em> をインストールする必要があります。
自分はXcodeを使っていないのでCommand Line Tools for Xcodeを使用しています。</p>
<p><a href="https://developer.apple.com/downloads/index.action">Apple Developer</a> で <em>Xcode</em> で検索してインストール用のdmgをダウンロードしてください。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-10-07-set-up-os-x-part-3/download-command-line-tools-for-xcode.png" alt="Download Command Line Tools for Xcode" /></p>
<p>ダウンロードするにはApple IDが必要ですので別途登録しておきましょう。</p>
<p>インストールの詳細は <a href="https://github.com/mxcl/homebrew/wiki/Installation">wiki</a> を参照してください。</p>
<p>インストールが完了したら以降は下記コマンドでHomebrewのパッケージをインストールできます。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>brew install <span class="o">[</span>package<span class="o">]</span>
</span></code></pre></td></tr></table></div></figure>
<p>次はHomebrewを利用してインストールするツール群の説明です。</p>
<h3>bash-completion</h3>
<p>とりあえずターミナルの補完を有効にしたいので <em>bash-completion</em> をインストールします。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>brew install bash-completion
</span></code></pre></td></tr></table></div></figure>
<p>インストール後は <code>$HOME/.profile</code> に下記設定を追加して補完設定を読み込むようにします。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="k">if</span> <span class="o">[</span> -f <span class="k">$(</span>brew --prefix<span class="k">)</span>/etc/bash_completion <span class="o">]</span>; <span class="k">then</span>
</span><span class='line'> . <span class="k">$(</span>brew --prefix<span class="k">)</span>/etc/bash_completion
</span><span class='line'><span class="k">fi</span>
</span></code></pre></td></tr></table></div></figure>
<p><code>source $HOME/.profile</code> するかターミナルを再起動して設定を反映しておきましょう。</p>
<h3>Git</h3>
<p>インストール必須ですね。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>brew install git
</span></code></pre></td></tr></table></div></figure>
<p>gitで日本語ファイル名が数字で表示されてしまうので(そもそも日本語ファイル名を使うなというツッコミはありますが)gitconfigに下記設定を追加します。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>git config --global core.quotepath <span class="nb">false</span>
</span></code></pre></td></tr></table></div></figure>
<p>あとはお好みでgitconfigを弄ればいいでしょう。
自分のgitconfigはこんなかんじです。 <a href="https://github.com/jiska/dotfiles/blob/master/.gitconfig">jiskaのgitconfig</a></p>
<p>さらにGitのブランチ名をターミナルに表示したいので
<code>$HOME/.profile</code> に下記設定を追加してます。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">PS1</span><span class="o">=</span><span class="s1">'\u:\w\$ $(__git_ps1 "[%s] ")'</span>
</span></code></pre></td></tr></table></div></figure>
<h3>Subversion</h3>
<p><a href="http://befool-inc.github.io/blog/2013/09/30/fix-homebrew-subversion17-unicode-patch/">別の記事</a>でも触れているのですが
自分は <em>unicode-path</em> オプションを利用したいので <strong>Subversion 1.7</strong> を使用しています。</p>
<p>Homebrewの標準レポジトリではコマンド1発でSubersion 1.7系をインストールすることができません。
そこで <strong>homebrew/versions</strong> をtapして <strong>subversion17</strong> をインストールします。
unicode-pathオプションも忘れずに。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>brew tap homebrew/versions
</span><span class='line'><span class="nv">$ </span>brew install subversion17 --unicode-path
</span></code></pre></td></tr></table></div></figure>
<h3>rbenv</h3>
<p>Rubyもちょっとしたワンライナー書いたり便利ツール作ったりするときに使ってます。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>brew install rbenv ruby-build
</span></code></pre></td></tr></table></div></figure>
<p>例によって下記設定を <code>$HOME/.profile</code> に追加します。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="k">if </span>which rbenv > /dev/null; <span class="k">then </span><span class="nb">eval</span> <span class="s2">"$(rbenv init -)"</span>; <span class="k">fi</span>
</span></code></pre></td></tr></table></div></figure>
<h3>PHP</h3>
<p>今現在PHPを用いた開発のお仕事をしていますがMac上でPHPアプリケーションを動かすことがほとんどありません…
開発する場合はVMに環境構築してます。</p>
<p>それでもローカルでちょっと確認したいなって場合があるのでPHPをインストールしてます。</p>
<p>HomebrewでPHPをインストールするために <a href="https://github.com/josegonzalez/homebrew-php">josegonzalez/homebrew-php</a> をtapしています。</p>
<p>インストールオプションはお好みで。あとWebサーバーは <em>Nginx</em> 使ってますのでNginxもインストールしときます</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>brew tap homebrew/dupes
</span><span class='line'><span class="nv">$ </span>brew tap josegonzalez/homebrew-php
</span><span class='line'><span class="nv">$ </span>brew install php54 --without-apache --with-fpm
</span><span class='line'><span class="nv">$ </span>brew install nginx
</span></code></pre></td></tr></table></div></figure>
<h2>最後に</h2>
<p>自分の開発環境のセットアップ手順のまとめみたいなものをツラツラと書き続けてきましたがようやくひとまとまりしました。
正直、上記の手順がめんどくさいので自動でセットアップをしたいなあと思うこのごろ。</p>
<p><a href="http://boxen.github.com/">Boxen</a> を使って今までの手順をレシピにして開発環境のセットアップ自動化してみようとおもいます。</p>
<div class='octopress-authorbox'>
<div class="author-pic" style="float:left;">
<img src="http://www.gravatar.com/avatar/6edaeca6d206ade350bc34b74ecc07e1" alt="森裕介" />
</div>
<div class="author-about" style="float:left;">
<h3>森裕介</h3>
<p>無念<br /></p>
<ul class="author-links">
<li>
<a href="http://twitter.com/jiskanulo">@jiskanulo</a>
</li>
<li>
<a href="http://d.hatena.ne.jp/jiskay/">jiskaのメモ書き</a>
</li>
</ul>
</div>
</div>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Unity勉強 第10回 「Prefabを試してみる」]]></title>
<link href="http://befool-inc.github.io/blog/2013/10/05/unity-study-10-prefab/"/>
<updated>2013-10-05T16:41:00+09:00</updated>
<id>http://befool-inc.github.io/blog/2013/10/05/unity-study-10-prefab</id>
<content type="html"><![CDATA[<h2>前回のおさらい&今回の目標</h2>
<p>最近夜になるとめまいで立ってられない智史之介です。おはようございます。<br/>
いい加減まずいな、と思い病院に行ったのですが、3分ほどの診療でMRIも撮らせてくれず、早々にあしらわれてしまいました…。<br/>
ファ○ク!!<br/>
他の病院探そう…。</p>
<p>今日の課題は「prefab」です。<br/>
Unityを触るにあたって避けては通れない要素のようですので、このあたりでまずは第一回挑戦をしておくべきかなと。<br/>
「Prefabとは?」というそんな段階から迫ってみたいと思います。</p>
<h2>Prefabとは?</h2>
<p><a href="http://ws.cis.sojo-u.ac.jp/~izumi/Unity_Documentation_jp/Documentation/Manual/Prefabs.html">Unity - プレハブ</a></p>
<blockquote><p>プレハブはAseetの種類の1つです。 再利用可能なゲームオブジェクトでプロジェクトビューに保存されます。プレハブは複数のシーンにも、また、1つのシーンに複数追加する事も出来ます。 プレハブをシーンに追加する時はインスタンス(instance)が生成されます。プレハブのインスタンスは、全てオリジナルのプレハブにリンクしているため、意味的にはクローンとなります。プロジェクトに存在するインスタンスの数に限らず、プレハブに変更を加えると、インスタンスにも反映されます。</p></blockquote>
<p>うーん。これだけでは正直よく分からないっす。Flashで例えると、ムービークリップとそのインスタンスのようなものなのかな…?</p>
<h2>漢なら、やってやれ、だ!</h2>
<p>とりあえず、直感的に感じた方法で試してみる事にします。</p>
<h3>prefabの作成</h3>
<p>prefabの作成に関しては、</p>
<ul>
<li>最初にprefabを作成して、その中にobjectを配置する方法</li>
<li>既存のobjectをprefab化する方法</li>
</ul>
<p>があるらしいです。
今回は後者の方法で試してみます。</p>
<h4>適当なobjectを配置する</h4>
<p><img src="http://befool-inc.github.io/images/posts/2013-10-05-unity-study-10-prefab/create-cube.png" alt="cubeの作成" /></p>
<p>えいっ。</p>
<h4>ドラッグ&ドロップでprefab化</h4>
<p>HierarchyタブからProjectタブにDrag&Dropで移動することでPrefab化できるようです。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-10-05-unity-study-10-prefab/create-prefab.png" alt="prefabの作成" /></p>
<h4>prefabをステージ上に配置する</h4>
<p><img src="http://befool-inc.github.io/images/posts/2013-10-05-unity-study-10-prefab/prefab-put-on-stage.png" alt="prefabの配置" /></p>
<p>Projectタブ内のprefabをDrag&Dropでステージに配置します。<br/>
これは「prefabのインスタンス化」と呼びます。(たぶん)</p>
<p>それにしてもUnityのこのカメラ周りの操作に未だになれません…。
自分が持って行きたいアングルになかなか調整できないのです…orz</p>
<h2>インスタンス同士はリンクしている?</h2>
<blockquote><p>プレハブのインスタンスは、全てオリジナルのプレハブにリンクしている</p></blockquote>
<p>という事なので、元のPrefabをいじった場合、全てのインスタンスにその影響があるはずです。
青色を適用するMaterialを作成し、それを先ほどPrefab化したCubeにDrag&Dropします。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-10-05-unity-study-10-prefab/attach-material-to-prefab.png" alt="prefabに色を適用する" /></p>
<p>おお!一斉に変わった!</p>
<p>ここまでであれば、一番最初に受けた印象である「Flashで例えると、ムービークリップとそのインスタンスのようなもの」という認識が正しいように思えますね…!</p>
<h2>せっかくなので</h2>
<p>色々試して見ようということで、cube prefabに「Rigidbody」というコンポーネントを当ててみました。<br/>
それがこれである。</p>
<p><a href="http://befool-inc.github.io/resources/posts/2013-10-05-unity-study-10-prefab/build.web/build.web.html">Unity WEBプレイヤー - Prefabテスト</a></p>
<p>やはり全てのインスタンスに同じ物理法則が割り当てられたようだ。イイデスネ!</p>
<h2>その他の用途</h2>
<p><a href="http://unity-study.net/archives/366">Resources.Loadでシーンをまたぐ変数 - Unity勉強記</a></p>
<p>こちらのサイトで紹介されている手法は、どうもprefab本来の使い方とは違うように見える(もしかしたら変数名として使用しているだけかもしれない)。
ただ、僕自身まだUnity初心者の域を出ないため、なんとも言えないところですが。。<br/>
もうちょっと経験を積んだら見えてくるものがあるかしら!</p>
<h2>次回に向けて</h2>
<p>今回は「prefab」に関してさくっとだけ触ってみました。Flashに慣れ親しんでいたせいもあるかもしれませんが、Flashの要素に置き換えて理解できると非常に個人的に分かりが良くて楽ですね。
ただし…!次回は「3Dモデルを操作する」事に挑戦してみようかなと思っています…!</p>
<p>Flashはご存じの通り2D指向のオーサリングツールです。(3D的なものを扱う事も可能ですが、やはり主戦場は2Dです)
Flashに置き換えて理解するのが難しい領域である3Dは、個人的にハードルの高い分野です。</p>
<p>頑張ります。では!</p>
<div class='octopress-authorbox'>
<div class="author-pic" style="float:left;">
<img src="http://www.gravatar.com/avatar/c158f3ca39ffcd3e3f1a56e5d14ccc0c" alt="木内智史之介" />
</div>
<div class="author-about" style="float:left;">
<h3>木内智史之介</h3>
<p>シャッチョー。<br />ミンカさんけっこんしてくださいおねがいします(ズザー<br />SEGAさん、DIVAの筐体ください(ズザー<br /></p>
<ul class="author-links">
<li>
<a href="http://twitter.com/grateful_dead">@grateful_dead</a>
</li>
<li>
<a href="http://d.hatena.ne.jp/grateful_dead/">生まれる時代をまちがえた</a>
</li>
</ul>
</div>
</div>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[HomebrewでSubversion17をインストールする際のunicode-pathオプションでのエラー対処]]></title>
<link href="http://befool-inc.github.io/blog/2013/09/30/fix-homebrew-subversion17-unicode-patch/"/>
<updated>2013-09-30T15:49:00+09:00</updated>
<id>http://befool-inc.github.io/blog/2013/09/30/fix-homebrew-subversion17-unicode-patch</id>
<content type="html"><![CDATA[<p>森です。アクセルハンマー派生だけで村クエクリアするべく奮闘中です。</p>
<p>仕事の都合上 <strong>subversion</strong> を使うことが多いのですが、 <strong>Homebrew</strong> でインストールする際に
<strong>–unicode-path</strong> オプション指定時にエラーが出てしまい困っていたので暫定対処をしたのでその経緯をまとめました。</p>
<h2>お断り</h2>
<p>この記事を書いている間に修正が入りました。ですのでこの記事の内容は過去の遺物であり現在は問題なく動作します。</p>
<p>以降は備忘録として閲覧ください…。</p>
<!-- more -->
<h2>前提</h2>
<p>Homebrewでそのままsubversionをインストールすると <em>subversion 1.8</em> になります。
subversion 1.8では後述の <code>--unicode-path</code> オプションが利用できないため <em>subversion 1.7</em> を使用します。
簡単にインストールしたいので <em>homebrew/versions</em> をtapして subversion 1.7用のパッケージ <em>subversion17</em> をインストールしています。</p>
<p>ただインストールしただけでは日本語を含んだファイル名をsvn上でうまく判断してくれないためいちいちmodified扱いになってしまいつらいです。というか使い物になりません。
そのため <code>--unicode-path</code> オプションを指定してインストールします。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
<span class='line-number'>23</span>
<span class='line-number'>24</span>
<span class='line-number'>25</span>
<span class='line-number'>26</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>brew tap homebrew/versions
</span><span class='line'><span class="o">(</span>tapped<span class="o">)</span>
</span><span class='line'>
</span><span class='line'><span class="nv">$ </span>brew info subversion17
</span><span class='line'>subversion17: stable 1.7.11
</span><span class='line'>http://subversion.apache.org/
</span><span class='line'>Not installed
</span><span class='line'>From: https://github.com/homebrew/homebrew-versions/commits/master/subversion17.rb
</span><span class='line'><span class="o">==</span>> Dependencies
</span><span class='line'>Build: pkg-config
</span><span class='line'>Required: neon, serf, <span class="nv">sqlite</span>
</span><span class='line'><span class="o">==</span>> Options
</span><span class='line'>--java
</span><span class='line'> Build Java bindings
</span><span class='line'>--perl
</span><span class='line'> Build Perl bindings
</span><span class='line'>--ruby
</span><span class='line'> Build Ruby bindings
</span><span class='line'>--unicode-path
</span><span class='line'> Include support <span class="k">for </span>OS X UTF-8-MAC filename
</span><span class='line'>--universal
</span><span class='line'> Build a universal binary
</span><span class='line'>--with-homebrew-openssl
</span><span class='line'> Include OpenSSL support via Homebrew
</span><span class='line'>--with-python
</span><span class='line'> Build with python support
</span></code></pre></td></tr></table></div></figure>
<h2>現象</h2>
<p>ところがいつの頃からか <code>--unicode-path</code> オプションを指定するとエラーが発生してしまいインストールが中断してしまうようになりました(´人`)</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>brew install subversion17 --unicode-path
</span><span class='line'><span class="o">==</span>> Downloading http://www.apache.org/dyn/closer.cgi?path<span class="o">=</span>subversion/subversion-1.7.11.tar.bz2
</span><span class='line'><span class="o">==</span>> Best Mirror http://ftp.kddilabs.jp/infosystems/apache/subversion/subversion-1.7.11.tar.bz2
</span><span class='line'><span class="c">######################################################################## 100.0%</span>
</span><span class='line'><span class="o">==</span>> Downloading patches
</span><span class='line'>
</span><span class='line'>curl: <span class="o">(</span>22<span class="o">)</span> The requested URL returned error: 404
</span><span class='line'>Error: Failure <span class="k">while </span>executing: /usr/bin/curl -f#LA Homebrew<span class="se">\ </span>0.9.5<span class="se">\ </span><span class="o">(</span>Ruby<span class="se">\ </span>1.8.7-358;<span class="se">\ </span>Mac<span class="se">\ </span>OS<span class="se">\ </span>X<span class="se">\ </span>10.8.5<span class="o">)</span> https://raw.github.com/gist/3044094/1648c28f6133bcbb68b76b42669b0dc237c02dba/patch-path.c.diff -o 000-homebrew.diff<span class="sb">```</span>
</span></code></pre></td></tr></table></div></figure>
<p>これは困ります。</p>
<h2>対処</h2>
<p>エラーログによると <em>unicode-pathのパッチを記したGistのURLが404を返してしまっている</em> ようです。
<em>subversion17</em> の設定を手動で変更します。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>vi /usr/local/Library/Taps/homebrew-versions/subversion17.rb
</span></code></pre></td></tr></table></div></figure>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="c1"># Patch for Subversion handling of OS X UTF-8-MAC filename.</span>
</span><span class='line'><span class="k">if</span> <span class="n">build</span><span class="o">.</span><span class="n">include?</span> <span class="s1">'unicode-path'</span>
</span><span class='line'> <span class="n">ps</span> <span class="o"><<</span> <span class="s2">"https://raw.github.com/gist/3044094/1648c28f6133bcbb68b76b42669b0dc237c02dba/patch-path.c.diff"</span>
</span><span class='line'><span class="k">end</span>
</span></code></pre></td></tr></table></div></figure>
<p>ここを</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="c1"># Patch for Subversion handling of OS X UTF-8-MAC filename.</span>
</span><span class='line'><span class="k">if</span> <span class="n">build</span><span class="o">.</span><span class="n">include?</span> <span class="s1">'unicode-path'</span>
</span><span class='line'> <span class="n">ps</span> <span class="o"><<</span> <span class="s2">"https://gist.github.com/jeffstyr/3044094/raw/1648c28f6133bcbb68b76b42669b0dc237c02dba/patch-path.c.diff"</span>
</span><span class='line'><span class="k">end</span>
</span></code></pre></td></tr></table></div></figure>
<p>こうします。</p>
<p>再度インストールしてみます。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
<span class='line-number'>23</span>
<span class='line-number'>24</span>
<span class='line-number'>25</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>brew install subversion17 --unicode-path
</span><span class='line'><span class="o">==</span>> Downloading http://www.apache.org/dyn/closer.cgi?path<span class="o">=</span>subversion/subversion-1.7.11.tar.bz2
</span><span class='line'>Already downloaded: /Library/Caches/Homebrew/subversion17-1.7.11.tar.bz2
</span><span class='line'><span class="o">==</span>> Downloading patches
</span><span class='line'><span class="c">######################################################################## 100.0%</span>
</span><span class='line'><span class="o">==</span>> Patching
</span><span class='line'>patching file subversion/libsvn_subr/path.c
</span><span class='line'><span class="o">==</span>> ./configure --prefix<span class="o">=</span>/usr/local/Cellar/subversion17/1.7.11 --with-apr<span class="o">=</span>/usr/local/Library/ENV/4.3 --with-zlib<span class="o">=</span>/usr --with-sqlite<span class="o">=</span>/usr/local/opt/sqlite --with-serf<span class="o">=</span>/usr/local/opt/serf --dis
</span><span class='line'><span class="o">==</span>> <span class="nv">make</span>
</span><span class='line'><span class="o">==</span>> make <span class="nv">install</span>
</span><span class='line'><span class="o">==</span>> make <span class="nv">tools</span>
</span><span class='line'><span class="o">==</span>> make install-tools
</span><span class='line'><span class="o">==</span>> Caveats
</span><span class='line'>This unicode-path version implements a hack to deal with composed/decomposed
</span><span class='line'>unicode handling on Mac OS X which is different from linux and windows.
</span><span class='line'>It is an implementation of solution 1 from
</span><span class='line'>http://svn.collab.net/repos/svn/trunk/notes/unicode-composition-for-filenames
</span><span class='line'>which _WILL_ <span class="nb">break </span>some setups. Please be sure you understand what you
</span><span class='line'>are asking <span class="k">for </span>when you install this version.
</span><span class='line'>
</span><span class='line'>
</span><span class='line'>Bash completion has been installed to:
</span><span class='line'> /usr/local/etc/bash_completion.d
</span><span class='line'><span class="o">==</span>> Summary
</span><span class='line'>🍺 /usr/local/Cellar/subversion17/1.7.11: 106 files, 8.1M, built in 4.8 minutes
</span></code></pre></td></tr></table></div></figure>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>svn --version
</span><span class='line'>svn, version 1.7.11 <span class="o">(</span>r1503888<span class="o">)</span>
</span><span class='line'> compiled Sep 30 2013, 18:00:03
</span></code></pre></td></tr></table></div></figure>
<p>無事にインストールできました!</p>
<h2>原因とPull Requests</h2>
<p>詳細なソースが見当たらないのですが <a href="https://github.com/blog/1406-namespaced-gists">GistのURL形式が変更になった</a> のですが、
いままで旧形式URLにアクセスしても新形式のURLにリダイレクトをしてくれていたのが
ある日を堺にリダイレクトをかけずに404を返すようになったのかな、と憶測しています。</p>
<p>とりあえず上記の件は<a href="https://github.com/Homebrew/homebrew-versions/pull/218">URLを変更するPull Requestを投げました</a>。
無事通るといいな。</p>
<p><em>18:53 09-30-2013 追記 → 無事にコミットされました</em> 。 <a href="https://github.com/Homebrew/homebrew-versions/commit/173b764c6b051144b23e01eb662896659f092eff">173b764c6b051144b23e01eb662896659f092eff</a></p>
<div class='octopress-authorbox'>
<div class="author-pic" style="float:left;">
<img src="http://www.gravatar.com/avatar/6edaeca6d206ade350bc34b74ecc07e1" alt="森裕介" />
</div>
<div class="author-about" style="float:left;">
<h3>森裕介</h3>
<p>無念<br /></p>
<ul class="author-links">
<li>
<a href="http://twitter.com/jiskanulo">@jiskanulo</a>
</li>
<li>
<a href="http://d.hatena.ne.jp/jiskay/">jiskaのメモ書き</a>
</li>
</ul>
</div>
</div>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Unity勉強 第9回 「永続データストレージを試してみる(ローカル編)」]]></title>
<link href="http://befool-inc.github.io/blog/2013/09/08/unity-study-09-save-variables-to-local-strage/"/>
<updated>2013-09-08T16:56:00+09:00</updated>
<id>http://befool-inc.github.io/blog/2013/09/08/unity-study-09-save-variables-to-local-strage</id>
<content type="html"><![CDATA[<h2>前回のおさらい&今回の目標</h2>
<p>最近FXを始めました。智史之介です。<br/>
前回から結構時間が開いてしまいましたね…。反省です。できれば週一と言わないまでも、隔週くらいでは勉強する時間を確保していきたいものです。</p>
<p>さて、前回のUnityの勉強ですが「<a href="http://befool-inc.github.io/blog/2013/06/15/unity-study-08-scene-change/">シーンの切り替え</a>」というような内容でした。
その関係で「シーンを跨いだ変数の保持」というような内容を試してみたくはあるのですが、ちょっと後回しにして…、今日は「永続データストレージ」に挑戦です。</p>
<h3>永続データストレージとは?</h3>
<p>ここで言うところの「永続データストレージ」とは、つまり、「 <strong>ゲームを落としても次回起動後に保存したデータを参照可能な領域</strong> 」というような意味合いです。
(なにっ、わかりづらいですと!すみません。)</p>
<h2>まずは箱形を用意</h2>
<p><img src="http://befool-inc.github.io/images/posts/2013-09-08-unity-study-09-save-variables-to-local-strage/create_project.png" alt="箱形" /></p>
<p>本当に簡単な内容になりますが、GUI Textオブジェクトをさくっと画面上に配置してみました。
ここに、ゲームを起ち上げてからの秒数を記録してみることにします。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
</pre></td><td class='code'><pre><code class='javascript'><span class='line'><span class="err">#</span><span class="nx">pragma</span> <span class="nx">strict</span>
</span><span class='line'>
</span><span class='line'><span class="kd">var</span> <span class="nx">timer</span> <span class="o">:</span> <span class="kr">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'><span class="kd">function</span> <span class="nx">Start</span> <span class="p">()</span> <span class="p">{</span>
</span><span class='line'> <span class="nx">guiText</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">timer</span><span class="p">.</span><span class="nx">ToString</span><span class="p">();</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'>
</span><span class='line'><span class="kd">function</span> <span class="nx">Update</span> <span class="p">()</span> <span class="p">{</span>
</span><span class='line'> <span class="kd">var</span> <span class="nx">time</span> <span class="o">:</span> <span class="kr">int</span> <span class="o">=</span> <span class="nx">timer</span> <span class="o">+</span> <span class="nx">Time</span><span class="p">.</span><span class="nx">time</span><span class="p">;</span>
</span><span class='line'> <span class="nx">guiText</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">time</span><span class="p">.</span><span class="nx">ToString</span><span class="p">();</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>
<p> <!-- ` --></p>
<p>スクリプトとしてはこんな感じ。これをGUI Textにドラッグ&ドロップでアタッチすることで、ゲームを起ち上げてからの秒数が画面上に表示されます。</p>
<p>ただし!これはゲームを一度落とすと再度「0」から始まってしまいます。
これを、前回の秒数を記録しておき、次回起ち上げ時には前回落とす前の数字から始まるように調整してみることにします。</p>
<h2>ローカルストレージにデータを保存する</h2>
<p>PlayerPrefsなるものを使用するようです。</p>
<ul>
<li><a href="http://d.hatena.ne.jp/nakamura001/20110712/1310441315">強火で進め: ゲームのスコア情報などを簡単に保存出来るPlayerPrefsクラス</a></li>
<li><a href="http://docs.unity3d.com/Documentation/ScriptReference/PlayerPrefs.html">Unity Script Reference: PlayerPrefs</a></li>
</ul>
<p>上記のサイトを参考にしつつ、スクリプトをこんな感じに改修。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
</pre></td><td class='code'><pre><code class='javascript'><span class='line'><span class="kd">function</span> <span class="nx">Update</span><span class="p">()</span> <span class="p">{</span>
</span><span class='line'> <span class="kd">var</span> <span class="nx">time</span> <span class="o">:</span> <span class="kr">int</span> <span class="o">=</span> <span class="nx">timer</span> <span class="o">+</span> <span class="nx">Time</span><span class="p">.</span><span class="nx">time</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'> <span class="c1">// Save to PlayerPrefs</span>
</span><span class='line'> <span class="nx">PlayerPrefs</span><span class="p">.</span><span class="nx">SetInt</span><span class="p">(</span><span class="s1">'timer'</span><span class="p">,</span> <span class="nx">time</span><span class="p">);</span>
</span><span class='line'>
</span><span class='line'> <span class="nx">guiText</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">time</span><span class="p">.</span><span class="nx">ToString</span><span class="p">();</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>
<p> <!-- ` --></p>
<p>どうやら、<code>PlayerPrefs.SetString</code>とか<code>PlayerPrefs.SetFloat</code>とか、型を指定して保存するらしい。<br/>
これはめんどくさいかもしれぬ…。</p>
<h2>ローカルストレージからデータを読み込んでみる</h2>
<p>上の修正だけではただデータを保存しているだけなので、起動時にPlayerPrefsから秒数を読み込む改修も加えてみることにします。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
</pre></td><td class='code'><pre><code class='javascript'><span class='line'><span class="kd">function</span> <span class="nx">Start</span> <span class="p">()</span> <span class="p">{</span>
</span><span class='line'> <span class="c1">// Has in PlayerPrefs ?</span>
</span><span class='line'> <span class="k">if</span> <span class="p">(</span><span class="nx">PlayerPrefs</span><span class="p">.</span><span class="nx">HasKey</span><span class="p">(</span><span class="s1">'timer'</span><span class="p">))</span> <span class="p">{</span>
</span><span class='line'> <span class="nx">timer</span> <span class="o">=</span> <span class="nx">PlayerPrefs</span><span class="p">.</span><span class="nx">GetInt</span><span class="p">(</span><span class="s1">'timer'</span><span class="p">);</span>
</span><span class='line'> <span class="p">}</span>
</span><span class='line'>
</span><span class='line'> <span class="nx">guiText</span><span class="p">.</span><span class="nx">text</span> <span class="o">=</span> <span class="nx">timer</span><span class="p">.</span><span class="nx">ToString</span><span class="p">();</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>
<p> <!-- ` --></p>
<p>これで、ゲームを落としても次回起動時は秒数が途中からカウントされるようになりました!ウホホーイ。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-09-08-unity-study-09-save-variables-to-local-strage/countup_timer.png" alt="カウントアップ成功" /></p>
<h2>PlayerPrefsの注意点</h2>
<p>PlayerPrefsは、そのデータをローカルの端末自身に保存されます(Windowsに至ってはどうもレジストリに書き込まれる模様?!)。
データ改ざんが容易である可能性が高いので、重要なデータなどはやはりネットワークを通じた外部に保存するのがよいのではないかなと思われます。。</p>
<p>ただ、プレイヤーの設定情報など、簡単なデータに関しては十分活用の余地はあると思いますので、適材適所で使って行けたらと思います。</p>
<h2>次回に向けて</h2>
<p>次回は、ついにというかなんというか、今まで見て見ぬ振りをしてきた「Prefab」なるものに手を出してみようかなと…。</p>
<p>Unityの事を調べる度にその名前が登場するほど、Unityでは当たり前の存在らしい、「Prefab」とは一体なにものなのか?!<br/>
まずはそこから調べてみようかと思います。</p>
<p>ではでは!</p>
<div class='octopress-authorbox'>
<div class="author-pic" style="float:left;">
<img src="http://www.gravatar.com/avatar/c158f3ca39ffcd3e3f1a56e5d14ccc0c" alt="木内智史之介" />
</div>
<div class="author-about" style="float:left;">
<h3>木内智史之介</h3>
<p>シャッチョー。<br />ミンカさんけっこんしてくださいおねがいします(ズザー<br />SEGAさん、DIVAの筐体ください(ズザー<br /></p>
<ul class="author-links">
<li>
<a href="http://twitter.com/grateful_dead">@grateful_dead</a>
</li>
<li>
<a href="http://d.hatena.ne.jp/grateful_dead/">生まれる時代をまちがえた</a>
</li>
</ul>
</div>
</div>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[自分用のOS X設定 その2]]></title>
<link href="http://befool-inc.github.io/blog/2013/08/31/set-up-os-x-part-2/"/>
<updated>2013-08-31T10:00:00+09:00</updated>
<id>http://befool-inc.github.io/blog/2013/08/31/set-up-os-x-part-2</id>
<content type="html"><![CDATA[<p>森です。前回にmacの設定をまとめましたが今回は自分が使っているソフトウェアを紹介します。</p>
<p>このまとめを書いている自分のMacは <strong>MacBook Air 11-inch Mid 2011</strong> 、 <strong>OS X 10.8.4</strong> です。
そのため他の機種、OSのバージョンではこのとおりの設定はできないかもしれませんのでご了承ください。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-12-set-up-os-x-part-1/my_os_x.png" alt="my OS X" /></p>
<!-- more -->
<h2>ユーティリティ</h2>
<h3>XtraFinder</h3>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-31-set-up-os-x-part-2/XtraFinder.png" alt="XtraFinder" />
<a href="http://www.trankynam.com/xtrafinder/">ダウンロード</a></p>
<p>mac標準のファイラーのFinderを拡張するソフトウェアです。Finderの操作が自分にはどうにも使いづらいので必須です。</p>
<p>Finderでは ファイル(ディレクトリ)選択時に <em>command + ↓</em> で選択項目を開きます、<em>return</em> だと選択項目のリネームです。
これが自分には全く馴染めません…。</p>
<p><strong>Return で選択項目を開く</strong> にチェックを入れます。
代わりにリネームを有効にするため <strong>名前変更</strong> に好きなキーボードショートカットを割り当てましょう。
自分は <em>command + return</em> にしています。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-31-set-up-os-x-part-2/XtraFinder-setting.png" alt="XtraFinderの設定" /></p>
<h3>iTerm 2</h3>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-31-set-up-os-x-part-2/iTerm-2.png" alt="iTerm 2" />
<a href="http://www.iterm2.com/">ダウンロード</a></p>
<p>標準のターミナルよりも多機能で色々設定ができます。</p>
<p>全角文字の表示崩れを防ぐために <strong>Treat ambiguous-width characters as double width</strong> にチェックをいれます。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-31-set-up-os-x-part-2/iTerm-2-setting.png" alt="iTerm 2の設定" /></p>
<h3>AppCleaner</h3>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-31-set-up-os-x-part-2/AppCleaner.png" alt="AppCleaner" />
<a href="http://www.freemacsoft.net/appcleaner/">ダウンロード</a></p>
<p>macで色々ソフトウェアをインストールして試し、
使わなくなったソフトウェアをアンインストール(といっても <em>/Applications</em> から削除するだけですが)しても
不要ファイルが残ってしまいます。</p>
<p>AppCleanerを使えば不要ファイルも一緒にアンインストールしてくれるので楽です。</p>
<h3>The Unarchiver</h3>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-31-set-up-os-x-part-2/The-Unarchiver.png" alt="The Unarchiver" />
<a href="https://itunes.apple.com/en/app/the-unarchiver/id425424353">ダウンロード</a></p>
<p>mac標準の解凍ツールではwindowsで作成されたzipファイルを解答できない場合があります。</p>
<p>The Unarchiverなら問題なく解答できます。</p>
<h3>FileZilla</h3>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-31-set-up-os-x-part-2/FileZilla.png" alt="FileZilla" />
<a href="https://filezilla-project.org/">ダウンロード</a></p>
<p>FTP, SFTPクライアントです。最近は使う機会が減りましたがたまにSFTPでファイルを複数やりとりするときに使います。</p>
<h2>テキストエディタ</h2>
<h3>mi</h3>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-31-set-up-os-x-part-2/mi.png" alt="mi" />
<a href="http://www.mimikaki.net/">ダウンロード</a></p>
<p>標準のテキストエディタはいろいろ心もとないのです…。
自分はβ版の <strong>mi テキストエディタ バージョン 3.0.0b3</strong> を使用しています。</p>
<h2>IDE</h2>
<h3>PhpStorm</h3>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-31-set-up-os-x-part-2/PhpStorm.png" alt="PhpStorm" />
<a href="http://www.jetbrains.com/phpstorm/">ダウンロード</a></p>
<p>PHPのIDEとして自分には必須です。もはやPhpStormがないと複数ファイルを扱うプロジェクトの開発ができない体になってしまいました。
初年 <strong>$99</strong> 、翌年から <strong>$49</strong> かかりますがそれ以上の価値は間違いなくあります。</p>
<p>日本の公認代理店の <a href="http://samuraism.com/products/jetbrains/phpstorm">サムライズムさん</a> で日本円で購入することもできるみたいです。</p>
<h2>だいたいこんなところ</h2>
<p>他には <em>Google Chrome</em> や <em>Google 日本語入力</em> 、 <em>RubyMine</em> を使ってますが紹介は割愛します。</p>
<p>次は <a href="http://brew.sh/index_ja.html">Homebrew</a> を使って <strong>tmux</strong> やら <strong>git</strong> やら <strong>subversion</strong> やらをインストールする方法を説明しますが長くなってきたので一旦区切ります。
無念。</p>
<div class='octopress-authorbox'>
<div class="author-pic" style="float:left;">
<img src="http://www.gravatar.com/avatar/6edaeca6d206ade350bc34b74ecc07e1" alt="森裕介" />
</div>
<div class="author-about" style="float:left;">
<h3>森裕介</h3>
<p>無念<br /></p>
<ul class="author-links">
<li>
<a href="http://twitter.com/jiskanulo">@jiskanulo</a>
</li>
<li>
<a href="http://d.hatena.ne.jp/jiskay/">jiskaのメモ書き</a>
</li>
</ul>
</div>
</div>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[自分用のOS X設定 その1]]></title>
<link href="http://befool-inc.github.io/blog/2013/08/12/set-up-os-x-part-1/"/>
<updated>2013-08-12T20:30:00+09:00</updated>
<id>http://befool-inc.github.io/blog/2013/08/12/set-up-os-x-part-1</id>
<content type="html"><![CDATA[<p>森です。さいきん気がつくと社内でmac使ってる人が増えてきたので、共有のためと
自分用の備忘、2つを兼ねてOS Xの設定とインストールしているソフトウェアを2つの記事に分けて記述します。</p>
<p>自分が想定している主な使い方は <strong>PHPを用いたWEBアプリケーションの開発</strong> に使うための設定です。</p>
<p>このまとめを書いている自分のMacは <strong>MacBook Air 11-inch Mid 2011</strong> 、 <strong>OS X 10.8.4</strong> です。
そのため他の機種、OSのバージョンではこのとおりの設定はできないかもしれませんのでご了承ください。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-12-set-up-os-x-part-1/my_os_x.png" alt="my OS X" /></p>
<!-- more -->
<h2>システム環境設定</h2>
<p>まずは <strong>システム環境設定</strong> の設定内容です。
画面左上の <strong>Appleのロゴをクリックしてシステム環境設定</strong> で表示できます。</p>
<p>この画面ですね。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-12-set-up-os-x-part-1/system_preferences.png" alt="システム環境設定" /></p>
<h3>言語とテキスト</h3>
<p>自分は本体を <strong>英語</strong> に設定してます。
英語の勉強するためにいいかな、などと思ってますが <em>あまり勉強になってない感じが強い</em> です…無念(´人`)</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-12-set-up-os-x-part-1/system_preferences_en.png" alt="system preferences" /></p>
<p><strong>言語とテキスト</strong> で <em>English</em> をリスト上部にドラッグすると本体設定が英語になります。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-12-set-up-os-x-part-1/language_and_text.png" alt="言語とテキスト" /></p>
<p>他の言語に変えたい、または日本語に戻したいなと思ったら自由に入れ替えることができるので一度試してみてもいいかもしれません。
今回の記事ではスクリーンショットは今回日本語で撮っています、
後で言語を切り替えてどのように表記が変わるのか見比べてみると楽しいかもしれません。</p>
<h3>キーボード</h3>
<p>自分はファンクションキーを押すことが多いので <strong>キーボード</strong> の設定で
<strong>F1、F2 などのすべてのキーを標準のファンクションキーとして使用</strong> にチェックをいれます。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-12-set-up-os-x-part-1/keyboard.png" alt="キーボード" /></p>
<p>キーボードショートカットでは <strong>フルキーボードアクセス</strong> を <strong>すべてのコントロール</strong> に設定しています。
<em>テキストボックスとリストのみ</em> を設定しているとダイアログが表示されたときにタブを連打してOKやキャンセルを選択するといった操作ができないからです。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-12-set-up-os-x-part-1/keyboard_shortcut.png" alt="キーボードショートカット" /></p>
<h3>トラックパッド</h3>
<p>MacBook Airにしてよかったなと思うのがトラックパッドの設定です。とても快適です。</p>
<p><img src="http://befool-inc.github.io/images/posts/2013-08-12-set-up-os-x-part-1/trackpad.png" alt="トラックパッド" /></p>
<p>ウィンドウを3本指で選択してドラッグしたり、
4本指で左右にスワイプしてワークスペースを切り替えたり、
<del>仕事がつらくなって現実逃避したくなったり</del>
なにか思いついたら右端から左にスワイプしてTwitterにつぶやいたり…</p>
<p>いろいろな項目がありますが自分はとりあえず <strong>全部ON</strong> にしてます。お好みでどうぞ。</p>
<p>次はターミナルを使って行う設定です。</p>
<!-- more -->
<h3>スクリーンショットの保存先を変更する</h3>
<p><strong>~/Pictures/Screen_Shots</strong> に保存してほしいので以下のコマンドをターミナルで実行します。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>defaults write com.apple.screencapture location ~/Pictures/Screen_Shots
</span><span class='line'><span class="nv">$ </span>killall SystemUIServer
</span></code></pre></td></tr></table></div></figure>
<p>設定がうまくいったか確認するには以下のコマンドです。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>defaults <span class="nb">read </span>com.apple.screencapture location
</span><span class='line'>/Users/jiska/Pictures/Screen_Shots
</span></code></pre></td></tr></table></div></figure>
<h2>まとめ</h2>
<p>他にもいろいろあった気がしますがとりあえず思いつく範囲で設定している項目はこんなところです。</p>
<p>次の記事は今回に引き続きインストールしているソフトウェアをまとめます。</p>
<div class='octopress-authorbox'>
<div class="author-pic" style="float:left;">
<img src="http://www.gravatar.com/avatar/6edaeca6d206ade350bc34b74ecc07e1" alt="森裕介" />
</div>
<div class="author-about" style="float:left;">
<h3>森裕介</h3>
<p>無念<br /></p>
<ul class="author-links">
<li>
<a href="http://twitter.com/jiskanulo">@jiskanulo</a>
</li>
<li>
<a href="http://d.hatena.ne.jp/jiskay/">jiskaのメモ書き</a>
</li>
</ul>
</div>
</div>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Vagrantで開発環境構築を自動化する]]></title>
<link href="http://befool-inc.github.io/blog/2013/07/14/use-vagrant/"/>
<updated>2013-07-14T15:53:00+09:00</updated>
<id>http://befool-inc.github.io/blog/2013/07/14/use-vagrant</id>
<content type="html"><![CDATA[<p><img src="http://befool-inc.github.io/images/posts/2013-07-14-use-vagrant/vagrant-logo.png" alt="Vagrant logo" /></p>
<p>森です。先日開催された <a href="http://chef-meetup.doorkeeper.jp/events/4624">Vagrant meetup</a> に参加しまして
開発者のHashimotoさんからVagrantのお話を聞くことができすごくホクホクしております。</p>
<p>熱が抜けないうちにVagrantを用いての開発環境作成のおさらいをこの場にまとめます</p>
<h2>Vagrant とは</h2>