Disclaimers:
- I'm hoping this will help you understand so you can help us improve our documentation.
- This is simplified version, i'm ignoring some details which are unimportant for discusing this.
| require.config({ | |
| baseUrl: '/backbone-tests/', | |
| paths: { | |
| 'jquery' : '/app/libs/jquery', | |
| 'underscore' : '/app/libs/underscore', | |
| 'backbone' : '/app/libs/backbone', | |
| 'mocha' : 'libs/mocha', | |
| 'chai' : 'libs/chai', | |
| 'chai-jquery' : 'libs/chai-jquery', | |
| 'models' : '/app/models' |
| // your app | |
| myapp = angular.module('myapp', []); | |
| myapp.directive('userView', function () {...}); | |
| myapp.factory('userApi', function () {...}); |
| <?php | |
| require_once dirname(__DIR__).'/../../../../app/AppKernel.php'; | |
| /** | |
| * Test case class helpful with Entity tests requiring the database interaction. | |
| * For regular entity tests it's better to extend standard \PHPUnit_Framework_TestCase instead. | |
| */ | |
| abstract class KernelAwareTest extends \PHPUnit_Framework_TestCase | |
| { |
| <?php | |
| use Symfony\Component\HttpFoundation\Request; | |
| use Symfony\Component\HttpFoundation\Response; | |
| abstract class FakeHttpTestCase extends \PHPUnit_Framework_TestCase | |
| { | |
| const APP_URL = 'http://127.0.0.1:8000'; | |
| /** |
By default when Nginx starts receiving a response from a FastCGI backend (such as PHP-FPM) it will buffer the response in memory before delivering it to the client. Any response larger than the set buffer size is saved to a temporary file on disk. This process is also explained at the Nginx ngx_http_fastcgi_module page document page.
Since disk is slow and memory is fast the aim is to get as many FastCGI responses passing through memory only. On the flip side we don't want to set an excessively large buffer as they are created and sized on a per request basis (i.e. it's not shared memory).
The related Nginx options are:
fastcgi_buffering appeared in Nginx 1.5.6 (1.6.0 stable) and can be used to turn buffering completely on/off. It's on by default.fastcgi_buffer_size](http://nginx.org/en/| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
| <?php | |
| // Usually, you can get category tree from category helper | |
| $helper = Mage::helper('catalog/category'); | |
| $nodes = $helper->getStoreCategories(); | |
| // return Varien_Data_Tree_Node_Collection | |
| // via Mage_Catalog_Model_Resource_Category | |
| // However, this get method return active category only. | |
| // Most of the samples are for collection of the category. |