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
<? | |
class Car | |
{ | |
publc function __construct($id) | |
{ | |
$this->id = $id; | |
} | |
/** |
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 | |
# | |
# Synchronization script for a project. | |
# | |
# This script will synchronize with production environment | |
# | |
[ "$1" = "go" ] && DryRun="" || DryRun="--dry-run" | |
[ "$1" = "go" ] && DeleteCommand="rm -rf" || DeleteCommand="ls" |
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 CalcSteps | |
{ | |
protected $calc; | |
protected $screen; | |
public function start() | |
{ | |
$this->calc = new Calc(); |
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
<?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 | |
{ |
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'), | |
}, | |
{ |
OlderNewer