Here's the base sanitizer:
<?php
namespace FooProject\Internal\Sanitizers;
abstract class BaseSanitizer
{
/**
Here's the base sanitizer:
<?php
namespace FooProject\Internal\Sanitizers;
abstract class BaseSanitizer
{
/**
server { | |
listen 80; | |
server_name localhost; | |
location /status { | |
access_log off; | |
default_type text/plain; | |
return 200 "alive"; | |
} | |
} |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var notify = require('gulp-notify'); | |
var sass = require('gulp-ruby-sass'); | |
var autoprefix = require('gulp-autoprefixer'); | |
var minifyCSS = require('gulp-minify-css') | |
var coffee = require('gulp-coffee'); | |
var exec = require('child_process').exec; | |
var sys = require('sys'); |
<?php | |
function slugify($string, $toLower = true) { | |
$rules = "Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove;"; | |
if ($toLower) { | |
$rules .= ' Lower();'; | |
} | |
$string = transliterator_transliterate($rules, $string); | |
// Remove repeating hyphens and spaces (e.g. 'foo---bar' becomes 'foo-bar') |
Following a few queries, I wrote this gist who quickly explain how we use GruntJS to build Patternlab and generate HTML for TYPO3 TemplaVoilà templates.
We use
If you have any question, leave a comment.
The entire Gruntfile.js
.
[www] | |
user = www-data | |
group = www-data | |
listen = /var/run/php5-fpm.sock | |
pm = dynamic | |
pm.max_children = 24 | |
pm.start_servers = 2 |
var gulp = require('gulp'); | |
var spawn = require('child_process').spawn; | |
var subprocess; | |
function refreshGulpfile() { | |
if (subprocess) subprocess.kill(); | |
subprocess = spawn('gulp', ['watched-default'], {stdio: 'inherit'}); | |
} | |
gulp.task('default', function () { |
You can use Codeception to test Javascript, like DOM manipulations and Ajax requests. Out of the box it can manipulate DOM elements but can't execute Javascript code, like most testing frameworks. But it gives you the option to use a WebDriver, to connect to a headless browser, and mimic a user browsing your website. It gives you some options: Selenium2, ZombieJS and, the easiest to configure, PhantomJS.
This article covers the installation and usage of PhantomJS, and assumes you are using Laravel Homestead, but it will work on any relatively new Debian based distro, like Ubuntu 14.04.
###Install PhantomJS
Just run those commands to install it:
sudo apt-get update
<?php | |
use GuzzleHttp\Post\PostFile; | |
$request = $client->createRequest('POST', 'http://example.com/'); | |
$postBody = $request->getBody(); | |
$readStream = $flysystem->readStream($fileLocation); | |
$postBody->addFile(new PostFile('test', $readStream); | |
$response = $client->send($request); |