Skip to content

Instantly share code, notes, and snippets.

@matt-halliday
matt-halliday / Context.php
Created September 20, 2018 12:12
Append files to file input in Behat with Selenium2 Driver
/**
* @Given I attach the file :path
* @param string $path
*/
public function iAttachTheFile(string $path)
{
// Get absolute local path
$localFile = '/var/www/html/' . $path;
// Convert to zip file
@matt-halliday
matt-halliday / package.json
Last active August 15, 2017 11:32
NPM package.json for frontend/assets building on a typical Symfony 3 project
{
"name": "some-project",
"version": "1.0.0",
"description": "Some Project",
"main": "index.js",
"scripts": {
"build-task:scss-compile": "node-sass --source-map true app/Resources/scss/app.scss -o web/css",
"build-task:css-minify": "postcss web/css/app.css --use cssnano autoprefixer -d web/css",
"build-task:assets": "cp -R app/Resources/assets/ web/assets/",
"build-task:jquery": "cp node_modules/jquery/dist/jquery.min.js web/js/",
@matt-halliday
matt-halliday / Dockerfile
Created August 1, 2017 08:58
Ensure MySQL is ready without some dirty bash script trying to connect
FROM mysql:5.7.16
RUN apt-get update \
&& apt install -y netcat \
&& apt-get clean && apt-get purge \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*