Mac OS X Yosemite 10.10 開発環境建構

Items to install

  • Basic environment
    • XCode, JDK, Homebrew
    • Android Studio
    • git, vim, … etc.
  • Node.js: nvm, grunt, bower
  • Python: virtualenv, django
  • IDEs, UI tools

Basic development

XCode, JDK

Homebrew

  • MySQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ brew install mysql
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/mysql-5.6.22.yosemite.bottle.tar.gz
==> Pouring mysql-5.6.22.yosemite.bottle.tar.gz
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.
To connect:
mysql -uroot
To have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don't want/need launchctl, you can just run:
mysql.server start

IDEs, UI tools

Code / Text editor

GUI Manager

SCM

  • GitX
    GitX is a git GUI made for Mac OS X. It currently features a history viewer much like gitk and a commit GUI like git gui. But then in silky smooth OS X style!

  • SourceTree
    Free Mercurial and Git Client for Windows and Mac

  • GitHub for Mac Issuepost

Database

  • Sequel Pro
    Sequel Pro is a fast, easy-to-use Mac database management application for working with MySQL databases.

  • Induction
    Induction ⚡ A Polyglot Database Client For Mac OS X

  • Redis Desktop Manager
    Redis GUI management tool for Windows, Mac OS X, Ubuntu and Debian.

  • Robomongo
    shell-centric MongoDB management tool (MongoDB Admin UI)

Others

  • iTerm2
    Mac OS Terminal Replacement

References

如何在 Koding 匯入 Dropbox 的部落格文章

也是廢話

一直覺得部落格編寫就該像在 WordPress.com 上,使用者只需編寫文章、存檔,之後系統會自動更新部落格。

Hexo 配上 Markdown 雖是我理想的部落格編寫組合,但編寫後仍需手動發布,總覺得還有一點差距。

理想流程是:使用者透過任何 Markdown 編輯器編寫文章、存檔到 Dropbox、Hexo 自動匯入文章後發佈。 使用者只需要寫文章就好,其他的皆由 koding 雲端主機處理。 如此,在旅行搭車候機無聊時,亦可使用平板電腦編寫部落格文章。
(單純理想,實際上我旅行無聊時只會拿平板出來看影片,有網路時只會上 facebook,不可能寫部落格的~)

介紹完HexoKoding後, 這篇文章將介紹把檔案放在 Dropbox 上,如何讓 hexo/hexi 匯入 dropbox 的文章並且自動發布。

Dropbox migrator

有用 Dropbox 的朋友應該都有安裝他的桌面程式,自動將某特定個資料夾保持和 Dropbox 同步。 而在 Koding 上則無法安裝這類的同步程式,需透過第三方程式來讀取 Dropbox 上的檔案。

Hexo Dropbox Migrator 是我寫的 hexo plugin,這個 plugin 可以把 Dropbox 上指定的資料夾內的檔案下載到 hexo 專案資料夾內。所以可以利用這 plugin 來處理 Koding 和 Dropbox 上 hexo 文章的同步。

install dropbox migrator

dropbox migrator 和大部分 hexo plugin 的安裝方式相同,在 hexo 專案目錄下, 透過終端機介面輸入下列指令即可安裝。

1
$ npm install git+https://github.com/kywk/hexo-migrator-dropbox.git --save

因為我尚未將 dropbox migrator 發佈至 npm,故需透過 git 網址的方式安裝這套件。

get dropbox access token

dropbox migrator 需要完成授權並取得授權碼後才可以讀寫 Dropbox 上的檔案,我們必須先完成授權。
請連到這個網址 (http://kywk.github.io/hexo-migrator-dropbox/),在步驟區塊中依序完成授權程序。

  1. 若你有自己的 Dropbox App Key,可在這個步驟輸入你的 App Key,否則直接 Next 即可。
  2. 先按第一個按鈕,會跳出 Dropbox 的授權視窗,按下允許完成授權後關閉授權視窗,再按下一步。
  3. 完成授權後,把授權資訊貼到 _config.yml 裡,可透過 Koding ACE 編輯器來完成。
    記得把 source_dir 改為你在 Dropbox 上放部落格文章的路徑。

using dropbox migrator

完成設定後,可透過下列指令下載 Dropbox 上的部落格文章至 hexo 系統中:

1
$ hexo migrate dropbox

若設定皆正確,此時 migrator 會開始下載檔案,等到檔案下載完成即可。

1
2
3
4
5
6
downloading: _posts/travel/1304_bohol/index_relax-boholiday.md
downloading: _posts/lifehacker/kywk-schdule.md
downloading: _posts/lifehacker/mind_working-skill.md
downloading: _posts/lifehacker/now-or-never.md
downloading: _posts/lifehacker/ted_fang-yi-sheu.md
......

當檔案全數下載完畢,即可生成部落格檔案並發布,和一般操作 hexo 系統一樣。

1
2
$ hexo g
$ hexo d

Crontab 自動化

目前尚未成功試出在 Koding 上使用 Crontab 的方式,難產中~

…TBC…

相關文章:

Sublime Text: kywk's Packages / Plugins

Package Control

The absolutely necessary package manager for Sublime. This is the optimal way to install all of the plugins and themes listed below.

Go ahead and install that at the package control site.

To Use: ctrl + shift + p Go into the command palette and type install.

Package Control will load all the packages available for install. Take a look at all the great things you can install and find your favorite packages..

edit / coding tools

Alignment

A very simple and easy to use plugin. I’m a very big fan of making your code organized and good looking. It helps tons when you revisit the code later down the road. Alignment helps with that.

To Use: Highlight the lines you want to align and press ctrl + alt + a
Simular packages: Abacus

BracketHighlighter

This plugin provides bracket highlighting for all sorts of brackets.

DocBlockr

A really great way to easily create doc blocks for many languages including JavaScript, PHP, and CoffeeScript. Just type in /** above your function and press tab. Watch the magic as DocBlockr takes the function name and variables and creates your doc block.

SublimeLinter

A framework for interactive code linting in the Sublime Text 3 editor.

SublimeCodeIntel

This plugin reads all your code and is able to code-complete, jump into definitions and function call tooltips.

Although sometimes looks a little buggy, it’s still worth having it around. It’s a huge time saver, especially when you are dealing with other’s people code.

HTML5 editing

Emmet (Zen Coding)

Emmet is an absolute time saver. You can build HTML on the fly easily and quickly.

Check out our Emmet Interactive Guide to learn more and try out Emmet for yourself.

To Use: ctrl + alt + enter and start typing your Emmet styled HTML

JsFormat

To Use: ctrl + alt + f Javascript formatting

Hayaku!

Hayaku gives you a way to write numeric and color values very fast. Just write numbers or colors with hash symbol after the property abbreviation and Hayaku would make everything for you:

Git

git

Git helps you interact with your Git repo. It has support for all sorts of things like init, push, pull, branch, stash, and more.

Git Gutter

To show an icon in the gutter area indicating whether a line has been inserted, modified or deleted.

Sublime GitHub

Provides a number of useful commands for GitHub, including creating and browsing gists, opening and editing files on GitHub, and bringing up the blame and commit history views.

Look & Feel

monokai-extended

Extends Monokai from Soda with new syntax highlighting for Markdown, LESS, and Handlebars and improved syntax highlighting for RegEx, HTML, LESS, CSS, JavaScript and more.

EJS

An EJS syntax definition specifically for sublime text

Handlebars.js

Sublime Text 2 / 3 package for Handlebars.js templates.

Soda

Soda Theme - Dark and light custom UI themes for Sublime Text

reference / resource