Something valuable for all annotation:
- Getting rid of boilerplate code.
- Configure, not coding.
- Reusing existing features.
| # Everything at once! | |
| $ vagrant box add ubuntu1310 http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-amd64-vagrant-disk1.box && vagrant init ubuntu1310 && vagrant up && vagrant ssh | |
| # Just Start and ssh into: | |
| $ vagrant up && vagrant ssh |
| # Open the plugin configuration. | |
| # Name is the same as filename under /etc/munin/plugins/{plugin_name} | |
| $ /etc/munin/plugin-conf.d/{plugin_name} | |
| # New Content: | |
| [{plugin_name}] | |
| env.warning 0 | |
| env.critical 0 |
| hello: | |
| @echo "Hello! use other targets!" | |
| deploy: | |
| git reset --hard -q | |
| git pull -q | |
| rm -rf bin/ | |
| php composer.phar install --no-progress --no-dev -o --quiet | |
| rm -rf app/cache/* |
| # Install a Webserver | |
| apt-get -y install apache2 | |
| # Target docroot to /home/satis/web/ | |
| # Install PHP5 CLI and needed programs. | |
| apt-get -y install php5-cli php5-curl php5-json git wget | |
| # Add a specifix user for our task | |
| adduser satis |
| # Function for starting browser in background | |
| browser() { firefox "$@" & } | |
| #--- Composer | |
| # Fetching latest composer version. | |
| alias getcomposer='curl -s https://getcomposer.org/installer | php' | |
| # Fetching latest composer version if not available and run it. |
| ffmpeg -i input.mov -vf "setpts=(1/10)*PTS" -an output.mov |
| <?php | |
| namespace Entity; | |
| use JMS\Serializer\Annotation as JMS; | |
| /** | |
| * @JMS\Discriminator(field = "type", map = { | |
| * "user": "Entity\User", | |
| * "mod": "Entity\Moderator" |
| # Replace branch names with for example: | |
| # $targetBranch = master | |
| # $sourceBranch = development | |
| # Need to checkout target branch at least once | |
| git checkout -q -f $targetBranch | |
| # Create path file for source branch | |
| git checkout -q -f $sourceBranch | |
| rm -f branch-test.patch |
| <?php | |
| namespace Silpion\ExampleBundle\Tests\Listener\Serialization; | |
| use Silpion\ExampleBundle\Entity\TextBlock; | |
| use Silpion\ExampleBundle\Listener\Serialization\SerializationListener; | |
| class SerializationListenerTest extends \PHPUnit_Framework_TestCase | |
| { | |
| /** @var SerializationListener */ |