使用brew cask来安装Mac应用

简介

brew cask 是一个用命令行管理 Mac 下应用的工具,它是基于 homebrew 的一个增强工具。

homebrew可以管理 Mac 下的命令行工具,例如imagemagick, nodejs,如下所示:

brew cask install qq
brew cask install google-chrome
brew cask install evernote

而使用上brew cask之后,你还可以用它来管理 Mac 下的 Gui 程序,例如qq, chrome, evernote等,如下所示:

brew cask install qq
brew cask install google-chrome
brew cask install evernote

安装

安装 homebrew

用以下一行命令即可安装 homebrew

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

之后执行 brew doctor 命令可以看看homebrew的环境是否正常。通常第一次安装完 brew 之后,还需要安装苹果的Command Line ToolsContinue reading

写好 Git Commit 信息的 7 个建议

这里推荐:http://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html
介绍: 为什么好的提交信息如此重要

当你随意浏览任一 git 仓库的日志,你很可能会发现其中的提交信息或多或少有点乱。举个例子,瞧一瞧我早先提交到 Spring 上的这些宝贝:

$ git log --oneline -5 --author cbeams --before "Fri Mar 26 2009"

e5f4b49 Re-adding ConfigurationPostProcessorTests after its brief removal in r814. @Ignore-ing the testCglibClassesAreLoadedJustInTimeForEnhancement() method as it turns out this was one of the culprits in the recent build breakage. The classloader hacking causes subtle downstream effects, breaking unrelated tests. The test method is still useful, but should only be run on a manual basis to ensure CGLIB is not prematurely classloaded, and should not be run as part of the automated build.

2db0f12 fixed two build-breaking issues: + reverted ClassMetadataReadingVisitor to revision 794 + eliminated ConfigurationPostProcessorTests until further investigation determines why it causes downstream tests to fail (such as the seemingly unrelated ClassPathXmlApplicationContextTests)

147709f Tweaks to package-info.java files

22b25e0 Consolidated Util and MutableAnnotationUtils classes into existing AsmUtils

7f96f57 polishing

狂吐吧!和最近提交到同一个仓库的信息比较一下:

$ git log --oneline -5 --author pwebb --before "Sat Aug 30 2014"

5ba3db6 Fix failing CompositePropertySourceTests

84564a0 Rework @PropertySource early parsing logic

e142fd1 Add tests for ImportSelector meta-data

887815f Update docbook dependency and generate epub

ac8326d Polish mockito usage

你更喜欢阅读哪一个?

前者长度和形式截然不同,后者则简洁一致。前者像是随意为之,而后者才是精心构思的。 Continue reading

react-native 中文教程

React Native探索(一):背景、规划和风险 http://www.infoq.com/cn/articles/react-native-overview

React Native探索(二):布局篇 http://www.infoq.com/cn/articles/react-native-layout

React Native探索(三):与 react-web 的融合 http://www.infoq.com/cn/articles/react-native-web

建议注册一个 https://rnplay.org 网站会员,上面有太多的实例学习代码,还有相应的app手机端。

React-Native With Redux  http://richard-cao.github.io/2016/01/12/React-Native-With-Redux/

react-native 中文教程

http://reactnative.cn/

http://wiki.jikexueyuan.com/project/react-native/debugging.html (不再更新)

官方教程:

http://facebook.github.io/react-native/docs/getting-started.html

学习教程:

http://www.oschina.net/translate/going-native-with-react

 

mac 下安装 PHP

http://segmentfault.com/a/1190000000606752 

如果用新的版本代替MAC自带的PHP版本的话,需要在安装完新版本的PHP后,再个性APACHE的HTTPD.CONF文件里的

sudo vim /etc/apache2/httpd.conf

找到

“#LoadModule php5_module  libexec/apache2/libphp5.so“

替换为

“LoadModule php5_module    /usr/local/opt/php56/libexec/apache2/libphp5.so”

参考:http://jingyan.baidu.com/article/e75aca857e3d7f142edac608.html