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
param( | |
[Parameter(mandatory = $True)][string]$path, | |
[switch]$force = $False, | |
[int]$portPrefix = 27000, | |
[int]$numShards = 3 | |
) | |
function LaunchMongoD() { | |
param( | |
[string]$processType = "shard", |
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
#^((?P<scheme>[^:/?]+):)?(//(?P<host>[^:/?]*)(:(?P<port>[^/?]*))?)?/(?P<dn>[^?\n]*)(\?(?P<attributes>[^?\n]*)(\?(?P<scope>[^?\n]*)(\?(?P<filter>[^?\n]*)(\?(?P<extensions>[^?\n]*))?)?)?)?$# | |
ldap://symfony.com:1234/cn=fabien,o=symfony | |
ldap://symfony.com:1234/cn=fabien,o=symfony?hello | |
ldap://symfony.com:1234/cn=fabien,o=symfony?hello?base | |
ldap://symfony.com:1234/cn=fabien,o=symfony?hello,world?one | |
ldap://symfony.com:1234/cn=fabien,o=symfony?foo,bar,baz?sub | |
ldap://symfony.com:1234/cn=fabien,o=symfony?foo,bar,baz??(&(objectclass=person)(ou=Maintainers)) | |
ldap://symfony.com:1234/cn=fabien,o=symfony?foo,bar,baz??test?bindname=cn=Fabien%20Potencier,dc=symfony,dc=com | |
ldap://symfony.com:1234/cn=fabien,o=symfony????bindname=cn=Fabien%20Potencier,dc=symfony,dc=com |
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 Animal { | |
constructor(race) { | |
this.race = race; | |
} | |
} | |
class Cat extends Animal { | |
constructor(race) { | |
super(race); | |
} |
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\DependencyInjection\ContainerAware; | |
use Csa\Bundle\GuzzleBundle\HttpFoundation\StreamResponse; | |
class MyController extends ContainerAware | |
{ | |
public function indexAction() | |
{ | |
// Call your client |
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 | |
rgit () { | |
if [[ "$#" -lt 2 ]]; then | |
echo "usage: rgit <repository-path> <command> [<args>]" | |
return 1 | |
fi | |
local worktree=$1 | |
shift |
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
# http://symfony.com/doc/current/cookbook/logging/channels_handlers.html#switching-a-channel-to-a-different-handler | |
monolog: | |
channels: ["guzzle"] | |
handlers: | |
main: | |
type: stream | |
path: /var/log/symfony.log | |
channels: ["!guzzle"] | |
guzzle: | |
type: stream |
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 AState extends AbstractState implements StateInterface | |
{ | |
public function methodA() | |
{ | |
try { | |
// Do stuff | |
// ... | |
} catch (\Exception $e) { | |
$this->workflow->setState(new ErrorState($this->workflow, $this)); |