Skip to content

Instantly share code, notes, and snippets.

View jiri-jagos's full-sized avatar

Jiri Jagos jiri-jagos

View GitHub Profile
@jiri-jagos
jiri-jagos / build.xml
Last active March 22, 2016 19:08 — forked from hectorsanjuan/build.xml
Phing build.xml for Symfony2 projects
<?xml version="1.0" encoding="UTF-8"?>
<project name="${projectName}" basedir="." default="build:main">
<!-- Properties -->
<property name="dir.app" value="${project.basedir}/app" />
<property name="dir.src" value="${project.basedir}/src" />
<property name="dir.build" value="${project.basedir}/app/build" />
<!--<property name="dir.docs" value="${dir.build}/docs" />-->
<!--<property name="dir.docs.phpdoc" value="${dir.docs}/phpdoc" />-->
<!--<property name="dir.docs.docblox" value="${dir.docs}/docblox" />-->
<property name="dir.reports" value="${dir.build}/logs" />
@jiri-jagos
jiri-jagos / README.md
Created September 24, 2015 20:42 — forked from magnetikonline/README.md
Setting Nginx FastCGI response buffer sizes.

Nginx FastCGI response buffer sizes

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:

/*
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes.
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed
*
* Usage:
* $ casperjs screenshots.js http://example.com
*/
var casper = require("casper").create();