- UserBundle installieren
- AsseticBundle zum Compilieren von Scss und Co on the fly
- https://symfony.com/doc/current/cookbook/assetic/asset_management.html#installing-and-enabling-assetic
- composer require leafo/scssphp
- composer require patchwork/jsqueeze
- composer require twitter/bootstrap
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 SudoObject | |
{ | |
/** | |
* @var object | |
*/ | |
private $instance; | |
/** |
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
# Sexy Bash Prompt, inspired by "Extravagant Zsh Prompt" | |
# Screenshot: http://cloud.gf3.ca/M5rG | |
# A big thanks to \amethyst on Freenode | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color | |
elif [[ $TERM != dumb ]] && infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color | |
fi | |
if tput setaf 1 &> /dev/null; then | |
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then |
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 | |
namespace Foo\Domain\Wallet; | |
use Foo\Domain\RepositoryInterface; | |
use Foo\Domain\Wallet; | |
interface WalletRepositoryInterface extends RepositoryInterface | |
{ |
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 | |
namespace Crmp\AccountingBundle\Form; | |
use Crmp\AccountingBundle\Entity\DeliveryTicket; | |
use Crmp\AccountingBundle\Entity\Invoice; | |
use Crmp\AcquisitionBundle\Entity\Contract; | |
use Symfony\Bridge\Doctrine\Form\Type\EntityType; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\Extension\Core\Type\NumberType; |
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 | |
// some might like this as 'deploy:clean', most have 'cleanup' | |
$clean_hook = 'cleanup'; | |
// assume wp cli is in the repo via composer | |
// change this to the path of your wp executable | |
set( 'wpcli_command', 'vendor/bin/wp' ); | |
function deployer_wp_cli( $command ) { |
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 | |
adduser --system --uid=$(stat -c "%u" /var/www) "host" | |
echo "APACHE_RUN_USER=host" >> /etc/apache2/envvars | |
SERVER_NAME=${SERVER_NAME:=localhost} | |
echo "ServerName $SERVER_NAME" > /etc/apache2/conf.d/server-name | |
/etc/init.d/apache2 start |
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 // Silence is golden. | |
namespace ScreamingDev { | |
if ( ! class_exists( '\\ScreamingDev\\Loader', false ) ) { | |
/** | |
* Load files of classes via SPL. | |
*/ | |
class Loader { |
Load additional scripts depending on post-type.
Additional files depending on the current screen will be loaded automatically. Possible screens can be:
- home
- search
- {post-type}
- {post-type}-archive
- {post-type}-single
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 | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Finder\Finder; | |
use Symfony\Component\Finder\SplFileInfo; | |
class Application extends \Symfony\Component\Console\Application | |
{ | |
public function __construct() | |
{ |
NewerOlder