Skip to content

Instantly share code, notes, and snippets.

services:
myservice:
volumes: npm-cache:/root/.npm
command: npm run install-start
volumes:
npm-cache:
external: false
#!/usr/bin/env bash
find . -iname '*.php' -exec php -l '{}' \; | grep '^No syntax errors' -v
<?php
class Handler extends ExceptionHandler
{
// ...
public function render($request, Exception $exception)
{
if (strpos($request->getUri(), '/api/') !== false) {
$exception = $this->prepareException($exception);
#!/usr/bin/env bash
# This script sets a parameter with the git tag that was
# just checked out (this is a post-checkout hook).
# If there is no tag, the parameter is set with the current
# branch name + the HEAD hash.
# Place this file into .git/hooks/ and chmod +x it.
set -e
# This is the parameters.yml parameter to look for
@raulneis
raulneis / sf
Last active October 17, 2018 13:46
Symfony console command shortcut
#!/bin/bash
#
# Instead of the `php bin/console` or `php app/console`, just type `sf`.
# Place this file in your ~/bin directory or include it in your path.
#
FILE=$(readlink -f ./bin/console)
if [ -f $FILE ]; then
php $FILE $@
#!/bin/bash
sudo a2dismod php7.0
sudo a2dismod php7.1
sudo a2enmod php5.6
sudo service apache2 restart
sudo ln -sfn /usr/bin/php5.6 /etc/alternatives/php