Skip to content

Instantly share code, notes, and snippets.

View hpatoio's full-sized avatar
:shipit:

Simone Fumagalli hpatoio

:shipit:
View GitHub Profile
{
[..]
"repositories": [
{
"type": "vcs",
"url": "/home/simone/workspace/local_bundles/DeployBundle"
}
],
[..]
"require": {
@hpatoio
hpatoio / change.sh
Last active December 31, 2015 03:19
simone@namazu:~/workspace/local_bundles/DeployBundle$ printf "\nMy new Line" >> README.md
simone@namazu:~/workspace/local_bundles/DeployBundle$ git add README.md
simone@namazu:~/workspace/local_bundles/DeployBundle$ git commit -m "Change on branch 'local'"
[local fc1aa1b] On branch 'local'
1 file changed, 2 insertions(+)
simone@namazu:~/workspace/local_bundles/DeployBundle$ git checkout -b local
Switched to a new branch 'local'
simone@namazu:~/workspace/local_bundles/DeployBundle$ git branch
* local
master
simone@namazu:~/workspace/local_bundles$ git clone https://github.com/hpatoio/DeployBundle DeployBundle
Cloning into 'DeployBundle'...
[..]
simone@namazu:~/workspace/local_bundles$ cd DeployBundle/
{
...
"require": {
...
"hpatoio/deploy-bundle": "1.*"
}
}
@hpatoio
hpatoio / mytask.rb
Last active December 19, 2015 15:29
set :stages, %w(staging prod)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
namespace :demo_task do
desc <<-DESC
Demo task
DESC
task :task, :roles => :app do
capifony_pretty_print "--> Demo task #{foo_var}"
simone@namazu:~/workspace/cms$ composer update hpatoio/deploy-bundle
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing hpatoio/deploy-bundle (1.3)
Loading from cache
Writing lock file
Generating autoload files
simone@namazu:~/workspace/composer create-project symfony/framework-standard-edition sf23_demo/ 2.3.0
@hpatoio
hpatoio / OneToManyFixture2.php
Created March 4, 2013 09:48
Right way to add a Doctrine2 relation
<?php
namespace Acme\DemoBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Acme\DemoBundle\Entity\Team;
use Acme\DemoBundle\Entity\Player;
@hpatoio
hpatoio / OneToManyFixture1.php
Created March 4, 2013 09:46
Wrong way to add a Doctrine2 relation
<?php
namespace Acme\DemoBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Acme\DemoBundle\Entity\Team;
use Acme\DemoBundle\Entity\Player;