This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', 'my_child_after_sab_init', 40 ); | |
function my_child_after_sab_init() { | |
remove_action( 'storeabill_email_document_details', array( 'Vendidero\StoreaBill\Emails\Mailer', 'summary' ), 20 ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example Express server using the custom Fractal view engine | |
const express = require('express'); | |
const path = require('path'); | |
const appRoot = path.normalize(path.join(__dirname, '..')); | |
const app = express(); | |
const fractalEngine = require(path.join(appRoot, 'lib/fractal-engine')); | |
const loadComponents = require(path.join(appRoot, 'middleware/load-components')); | |
// register custom Fractal rendering engine | |
app.engine('fractal', fractalEngine); |
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 outlined at the Nginx ngx_http_fastcgi_module page manual page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stream = require('stream'); | |
function streamify(text) { | |
var s = new stream.Readable(); | |
s.push(text); | |
s.push(null); | |
return s; | |
} | |
streamify('foo\n').pipe(process.stdout); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example: | |
JavaScript.load("/javascripts/something.js"); | |
// With callback (that’s the good thing): | |
JavaScript.load("http://www.someawesomedomain.com/api.js", function() { | |
API.use(); // or whatever api.js provides ... | |
}); |