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 | |
/* | |
You can't use classes like this to define steps by the simple reason: | |
in Behat and Cucumber, step definitions and test contexts ARE two | |
splitted logical elements, not one. Different step definitions | |
can be used together in different scenarios and each scenario will | |
have it's own context (environment) object. That's the main logical | |
idea behind Behat - define step once - use it everywhere. |
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\HttpFoundation\Request as Response; | |
use Symfony\Component\HttpFoundation\Response as Request; |
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
alex@alex-laptop: composer update | |
Updating dependencies | |
Your requirements could not be solved to an installable set of packages. | |
Problems: | |
- Problem caused by: | |
- Package "behat/mink-bundle-9999999-dev" contains the rule behat/mink-bundle requires behat/mink ([>= 1.3.2.0, < 1.4.0.0-dev]). Any of these packages satisfy the dependency: behat/mink-1.3.3.0, behat/mink-1.3.2.0, behat/mink-1.3.4.0. | |
- -behat/mink-1.4.0.0|-behat/mink-1.3.3.0 | |
- -behat/mink-1.4.0.0|-behat/mink-1.3.4.0 | |
- Package "behat/mink-selenium2-driver-9999999-dev" contains the rule behat/mink-selenium2-driver requires behat/mink ([>= 1.4.0.0, < 1.5.0.0-dev]). Any of these packages satisfy the dependency: behat/mink-1.4.0.0, behat/mink-1.4.0.0. |
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 require_once __DIR__.'/vendor/autoload.php'; | |
/** gitlib: http://gitonomy.com/doc/gitlib/master/ */ | |
$repo = Gitonomy\Git\Admin::init('/tmp/test', false); | |
$repo->run('remote', array('add', 'origin', 'https://github.com/gitonomy/gitlib.git')); | |
$repo->run('fetch', array('--all')); | |
$wc = $repo->getWorkingCopy(); | |
$wc->checkout('master'); |
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
# Generate a private key | |
openssl genrsa -des3 -out server.key.org 1024 | |
# Generate a CSR: Certificate Signing Request | |
openssl req -new -key server.key.org -out server.csr | |
# Remove password from key | |
openssl rsa -in server.key.org -out server.key | |
# Generate a self-signed certificate |
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
public function getCacheDir() | |
{ | |
$dir = getenv('SYMFONY__CACHE_DIR') ?: dirname(__DIR__).'/var/cache'; | |
return $dir.'/'.$this->getEnvironment(); | |
} | |
public function getLogDir() | |
{ | |
$dir = getenv('SYMFONY__LOGS_DIR') ?: dirname(__DIR__).'/var/logs'; |
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
<ul class="nav navbar-nav"> | |
{% set navbar_active = navbar_active|default(null) %} | |
{% set navbar_menu = navbar_menu|default([ | |
{ | |
'show': app.user and is_granted('ROLE_ADMIN'), | |
'active': navbar_active == 'design', | |
'label': 'Design', | |
'href': path('admin_design'), | |
}, | |
{ |
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
[alias] | |
st = status | |
ci = commit | |
br = branch | |
co = checkout | |
up = pull --rebase --autostash | |
ds = diff --staged | |
lg = log --oneline --graph --decorate | |
[core] | |
excludesfile = ~/.gitignore |
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 Gitonomy\Bundle\CoreBundle\Serializer\Normalizer; | |
use Symfony\Bridge\Doctrine\RegistryInterface; | |
use Symfony\Component\Serializer\Normalizer\NormalizerInterface; | |
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; | |
class EntitiesNormalizer implements NormalizerInterface, DenormalizerInterface | |
{ |
OlderNewer