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

Linux install rubygems

CentOS

1
2
3
4
sudo yum install ruby
sudo yum install gcc g++ make automake autoconf curl-devel openssl-devel zlib-devel httpd-devel apr-devel apr-util-devel sqlite-devel
sudo yum install ruby-rdoc ruby-devel
sudo yum install rubygems

php-resque 的安装和使用

安装

1
2
3
4
5
6
7
8
## 安装 Composer
curl -s http://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

## 安装 php-resque
git clone https://github.com/chrisboulton/php-resque.git
cd php-resque
composer install

Android 卸载所有第三方应用

adb shell pm list packages 列出所有包名
adb uninstall PACKAGE_NAME 卸载

1
2
3
4
5
6
7
#!/bin/bash

for package_name in `adb shell pm list packages -3 | awk 'BEGIN { FS = ":|\r" } { print $2 }'`; do
echo adb uninstall ${package_name}
adb uninstall ${package_name}
echo -------------
done