Shell 字符串操作整理

参考链接:http://justcoding.iteye.com/blog/1963463

TinyPNG

arc-property-copy

  • 事实上,给不可变对象发送copy并不会复制对象,而是添加一个引用计数后再返回原值。其实对不可变对象调用copy和调用retain效果一样(设定一个strong属性变量时,ARC就会在后台调用retain)。

参考书籍: 《精通iOS开发(第7版)》

Linux ping unknown host

情景:ping 域名不通,ping IP 地址正常。

解决方案: http://www.cnblogs.com/happyhotty/articles/2539951.html

CentOS 升级 Ruby

起因: http://stackoverflow.com/questions/33225915/ruby-sinatra-throwing-wrong-number-of-arguments-2-for-1-in-const-get

sudo PATH 改变的问题

参考链接: http://unix.stackexchange.com/questions/91541/why-is-path-reset-in-a-sudo-command

React Native 安装

常见服务器产品介绍

服务器市场份额情况参考: October 2015 Web Server Survey

Homebrew update的问题

OS X 某个版本后,执行brew update会遇到一些问题,原因应该是 /usr/local 目录的所属变成了admin,改为自己即可。

1
2
3
4
5
6
7
8
9
MacBook-Pro:~ fang$ brew update && brew upgrade
Error: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.

You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami):admin /usr/local

IBOutletCollection

参考链接: http://www.cocoachina.com/ios/20150514/11807.html
http://stackoverflow.com/questions/15836930/how-can-i-use-iboutletcollection-to-connect-multiple-uiimageviews-to-the-same-ou