Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
| du --block-size=MiB --max-depth=1 path | sort -n |
| # Install Ruby | |
| wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz | |
| tar xvzf ruby-2.1.1.tar.gz | |
| cd ruby-2.1.1 | |
| ./configure --prefix=/usr | |
| make | |
| make install | |
| # remove "ruby-2.1.1" folder in /root |
| docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |
| server { | |
| listen 80; | |
| client_max_body_size 2M; | |
| server_name ng-book.oppoin.com; | |
| root /var/virtual/ng-book.oppoin.com/current/examples/http-api-server; | |
| location / { | |
| index index.html index.htm; | |
| } |
| <?php | |
| // we're loading the Database TestCase here | |
| require 'PHPUnit' . DIRECTORY_SEPARATOR . 'Extensions' . | |
| DIRECTORY_SEPARATOR . 'Database' . DIRECTORY_SEPARATOR . | |
| 'TestCase.php'; | |
| class FixtureTestCase extends PHPUnit_Extensions_Database_TestCase { | |
| public $fixtures = array( | |
| 'posts', |
| <?php | |
| /** | |
| * Simple example PHP code to parse "mailq" output. Useful if you want to show | |
| * the mail queue status through some web service. | |
| * | |
| * Notice that you'll need a mail server (sendmail or, better, postfix) to be | |
| * running on the same machine as your webserver (often that's less that | |
| * optimal.) | |
| * | |
| * If this doesn't work, be sure to check that you have sufficient permissions |