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

adb 命令

参考链接

NSMutableArray arrayWithCapacity

NSMutableArray -init vs. +arrayWithCapacity:

参考链接:
http://stackoverflow.com/questions/22395963/understanding-arraywithcapacity-method-on-nsmutablearray
http://stackoverflow.com/questions/1730706/nsmutablearray-init-vs-arraywithcapacity

JavaScript alert not working in Android WebView

参考链接

Call to undefined function curl_init()

参考链接: http://stackoverflow.com/questions/6382539/call-to-undefined-function-curl-init

Root view controller

参考链接: http://stackoverflow.com/questions/30884896/application-windows-are-expected-to-have-a-root-view-controller-at-the-end-of-a

PHP获取时间错误

参考链接: http://stackoverflow.com/questions/16765158/date-it-is-not-safe-to-rely-on-the-systems-timezone-settings

Yosemite+ 启用apache、php

参考链接: https://discussions.apple.com/docs/DOC-3083

PHP is not enabled in recent versions of OS X. To enable it, do: