49
51

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MacBookAirで使っている便利ツール vol.2

Last updated at Posted at 2013-10-11

一年前に書いた情報がだいぶ古くなってきたので、書きなおしてみました。

簡易解説

まず、パッケージ管理はどれにするかです。 Macports, Homebrew, Fink, Gentoo Prefixなどがあります。

個人的には、MacPorts がおすすめです。

次に、 CommandLineToolsのインストールです。 Xcodeをインストールしたあとでもいいのですが、 Xcodeを使わなければ前者だけのほうが容量節約になります。

設定ファイルは、GitHubDropboxで共有すると便利です。

GUIアプリは、Boxenでインストールする方法などがあります。しかし、個人的には、/Applications/フィルダにあるファイルをバックアップしています。

チャットをより便利にするには、Hubotが便利です。

あと、フォント、特にPowerline用にパッチを当てたフォントなどは共有(バックアップ)しておくといいです。

おすすめはフォントは、Rictyです。

GUI

iTerm2 //
http://www.iterm2.com/#/section/downloads

VirtualBox //
https://www.virtualbox.org/wiki/Downloads

KeyRemap4MacBook //
https://pqrs.org/macosx/keyremap4macbook/index.html.ja

Google Chrome //
http://www.google.com/intl/ja/chrome/browser/

Firefox //
http://www.mozilla.jp/firefox/

ShiftIt //
https://code.google.com/p/shiftit/downloads/list

Dropbox //
https://www.dropbox.com/

ClamXav //
http://www.clamxav.com/download.php

Google IME //
http://www.google.co.jp/ime/

KeePassX //
http://www.keepassx.org/downloads/

SublimeText2 //
http://www.sublimetext.com/2

MacVim //
https://code.google.com/p/macvim-kaoriya/downloads/list

ClipMenu //
http://www.clipmenu.com/ja/

Android File Transfer //
http://www.android.com/filetransfer/

CCleaner //
https://itunes.apple.com/jp/app/ccleaner/id499268461?mt=12

VLC //
http://www.videolan.org/vlc/download-macosx.html

Skitch //
http://update.skitch.com/skitch.html

GIMP //
http://www.gimp.org/downloads/

Quicksilver //
http://qsapp.com/download.php

BetterTouchTool //
http://blog.boastr.net/downloads-secondbar-bettertouchtool-2/

XtraFinder //
http://www.trankynam.com/xtrafinder/

TinkerTool //
http://www.bresink.com/osx/0TinkerTool/download.php5

AppCleaner //
http://freemacsoft.net/appcleaner/

Wireshark //
http://www.wireshark.org/download/osx/

XQuartz //
http://xquartz.macosforge.org/landing/

Java //
http://java.com/en/download/mac_download.jsp

CUI

設定ファイルを見て必要そうなものを適当にインストールする。MacPorts

sudo port selfupdate

sudo port install zsh w3m vim tmux p5.16-image-exiftool googlecl imagemagick mplayer ffmpeg swftools ctags atool wget curl apple-gcc42 coreutils proctools autojump gdb winetricks weechat mutt

Rubyのバージョン管理は、rbenv でもいいのですが、私は、
rvmを使っています。

ruby

sudo port install apple-gcc42

CC=/opt/local/bin/gcc-apple-4.2

sudo gem install rvm

bash < <(curl -s -B https://rvm.beginrescueend.com/install/rvm)

rvm get head

rvm get latest

rvm install 1.9.3

for i in autoconf readline openssl iconv zlib libxml2 libxslt libyaml ;do rvm pkg install $i ; done;

rvm use 1.9.3 --default

rvm list

sudo gem install rubygems-update

twitter client

git clone https://github.com/jugyo/earthquake.git

cd earthquake

sudo gem install bundler

sudo bundle install

sudo gem install earthquake

python

easy_install pip
...Error

curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py > ./ez_setup.py

sudo python ./ez_setup.py

sudo pip install --upgrade httpie

sudo pip install virtualenv

sudo pip install virtualenvwrapper

sudo pip install percol

sudo pip install pip-tools

node/coffeescript/javascript

sudo port install npm

npm --version

sudo npm install coffee-script -g

scala/java

sudo port -du install scala2.10

sudo port select --list scala

sudo port select --set scala scala2.10

w3m http://support.apple.com/kb/DL1572

vim

mkdir -p ~/.vim/bundle && git clone git://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim && vim +NeoBundleInstall

vimprocを自動インストールしたければ、以下のように書きます。

~/.vimrc
    NeoBundle 'Shougo/vimproc', {
    \ 'build' : {
    \ 'windows' : 'make -f make_mingw32.mak',
    \ 'cygwin' : 'make -f make_cygwin.mak',
    \ 'mac' : 'make -f make_mac.mak',
    \ 'unix' : 'make -f make_unix.mak',
    \ },
    \ }

Security

sudo port install nmap aircrack-ng ophcrack

脆弱性検証ツールとパケット解析ツール
を入れます。

MetasploitFramework

cd /usr/local/bin/

git clone https://github.com/rapid7/metasploit-framework.git msf

rvm requirements

rvm install ruby-1.9.3-p392

rvm gemset create msf

rvm use --create --default 1.9.3-p392@msf

cd msf

sudo bundle install

./msfconsole -L

Wireshark

sudo chmod 644 /dev/bpf*

curl -o ChmodBPF.tar https://arbitrary-blog-execution.googlecode.com/files/ChmodBPF.tar

aunpack ChmodBPF.tar

sudo mv ChmodBPF /Library/StartupItems/

sudo chown -R root /LibraryStartupItems/ChmodBPF

GitHub

役立ちそうなパッケージです。実際、どれも一度は使ったことがありますし、この中には、使い続けているものもあります。

git clone https://github.com/erikw/tmux-powerline.git

git clone https://github.com/zsh-users/zaw.git

git clone https://github.com/hchbaw/auto-fu.zsh.git

git clone https://github.com/rupa/z.git

git clone https://github.com/joelthelion/autojump.git

git clone https://github.com/zsh-users/zsh-completions.git

git clone https://github.com/robbyrussell/oh-my-zsh.git

git clone https://github.com/samirahmed/fu.git

curl https://raw.github.com/zsh-users/antigen/master/antigen.zsh > antigen.zsh

https://github.com/erikw/tmux-powerline

https://github.com/zsh-users/zaw

https://github.com/hchbaw/auto-fu.zsh

https://github.com/rupa/z

https://github.com/joelthelion/autojump

https://github.com/zsh-users/zsh-completions

https://github.com/robbyrussell/oh-my-zsh

https://github.com/zsh-users/antigen

Windows

Windowsを動かす場合は、以下の様なパッケージ管理を使います。

Start-Process powershell.exe -Verb runas

Set-ExecutionPolicy RemoteSigned

iex ((new-object net.webclient).DownloadString("http://bit.ly/psChocInstall"))

'jenkins', 'apache.ant', 'mvn', 'gradle', 'msysgit', 'poshgit' | % { cinst $_ }

ERROR

うまく行かなかったインストール。参考までに。

XQuartz

sudo port install xorg-server-devel +universal

sudo port upgrade xorg-libXt

sudo port install xorg-server-devel +universal

wireshark

sudo port install wireshark

sudo port installed lua

sudo port upgrade lua

sudo port uninstall wireshark

sudo port clean --all wireshark

sudo port -c uninstall gtk2

sudo port install wireshark

metasploit4

sudo port install msgpack

sudo port install ruby19 +nosuffix

sudo svn co https://www.metasploit.com/svn/framework3/trunk/ /opt/local/msf/

sudo ln -s /opt/local/msf/msf* /opt/local/bin

ファイラー/ファイルマネージャー

Macの初期設定時などは、お世話になることが多いです。

~/.vimrc
NeoBundle "Shougo/vimfiler.vim"
~/.vimrc
    " vimfiler
    "" 自動起動
    autocmd VimEnter * VimFiler -split -simple -winwidth=30 -no-quit
    "" [:e .]のように気軽に起動できるようにする
    let g:vimfiler_as_default_explorer = 1
    "" セーフモードの設定(OFF
    let g:vimfiler_safe_mode_by_default=0

    " netrwは常にtree view
    let g:netrw_liststyle = 3
    " 'v'でファイルを開くときは右側に開く。(デフォルトが左側なので入れ替え)
    let g:netrw_altv = 1
    " 'o'でファイルを開くときは下側に開く。(デフォルトが上側なので入れ替え)
    let g:netrw_alto = 1
    " 'v'や'o'で開かれる新しいウィンドウのサイズを指定する
    let g:netrw_winsize = 80

以下のようにエイリアスを設定してもいいかもしれません。

~/.zshrc
alias f='vim +VimFiler'

しかし、普段はShell(zsh)の cdrや historyを使うことが多いので、一定期間パソコンを使っていると、コメントアウトしてしまう設定ではあります
。(historyなどのファイルは共有しないので...。

Setting

open -a "system preferences"

cd ~/Applications/

open .
キーボード > キーボードショートカット > すべてのコントロール
    キーボードと文字入力 > 一番手前..., 次のウィンドウ...

セキュリティとプライバシー > 一般 > すべてのアプリケーションを許可
    ファイアウォール

共有 > コンピュータ名 > 編集

トラックパッド > スクロールとズーム > ナチュラル

アクセシビリティ > 補助装置にアクセスできるようにする

言語とテキスト > 入力ソース > ことえり

OS

VirualBoxを使って、仮想環境を作ります。なお、Vagrantを使うと、簡単に仮想環境を自動構築することができます。ちなみに、すでに環境を構築している場合は、~/VirtualBox\ VMs/以下にあるファイルをバックアップして、追加するのもいいです。

Gentoo Linux //
http://www.gentoo.org/main/en/where.xml

Arch Linux //
https://www.archlinux.org/download/

Kali Linux //
http://www.kali.org/downloads/

Ubuntu //
http://www.ubuntu.com/download

Output

アウトプットするときは、Markdownで書くことが多いかもしれませんが、以下のツールが役立ちます。

# md -> html
git clone https://github.com/aaronsw/html2text.git

cd html2text/

./html2text.py test/GoogleDocMassDownload.html

# html -> md
sudo port install multimarkdown

multimarkdown test/GoogleDocMassDownload.md

プレビューするときなどは、qlmanageを使ってもいいです。

qlmanage -p  test/GoogleDocMassDownload.md
49
51
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
49
51

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?