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
services: | |
myservice: | |
volumes: npm-cache:/root/.npm | |
command: npm run install-start | |
volumes: | |
npm-cache: | |
external: false |
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
#!/usr/bin/env bash | |
find . -iname '*.php' -exec php -l '{}' \; | grep '^No syntax errors' -v |
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 | |
class Handler extends ExceptionHandler | |
{ | |
// ... | |
public function render($request, Exception $exception) | |
{ | |
if (strpos($request->getUri(), '/api/') !== false) { | |
$exception = $this->prepareException($exception); |
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
#!/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 |
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
#!/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 $@ |
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
#!/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 |