This file contains hidden or 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 Acme\Foo; | |
| use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; | |
| class FooCacheWarmer implements CacheWarmerInterface | |
| { | |
| public function isOptional() | |
| { |
This file contains hidden or 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
| liuggio = new Employee(); | |
| liuggio.createdAt = new Datetime("now") | |
| liuggio.salaryPrice = 9999999.00 | |
| liuggio.salaryCurrency = "EUR" | |
| liuggio.name = "liuggio" | |
| if not externalValidator.validate(liuggio, context) { | |
| return error | |
| } |
This file contains hidden or 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
| Feature: Build | |
| In order to build classes | |
| As a feature developer | |
| I need to have an ability to use the factory traits. | |
| Scenario: Build a Class using private methods | |
| Given a file named "Customer.php" with: | |
| """ | |
| <?php |
This file contains hidden or 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
| #!/usr/bin/env php | |
| <?php | |
| function executing($cmd) { | |
| echo $cmd.PHP_EOL; | |
| system($cmd); | |
| } | |
| function runInit($env) { | |
| executing('php app/console --env='. $env .' doctrine:database:drop --force'); |
This file contains hidden or 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 | |
| /** | |
| * We are used to create Commands/UseCases with a single method, | |
| * is very common to create the name of the method with `execute` | |
| * `$doSomething->execute($thisDay)` | |
| * or to create the method name repeating the expressive class name: | |
| * `$doSomething->doSomething($thisDay)`. | |
| * | |
| * This gist uses the magic call invoke |
This file contains hidden or 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
| /** | |
| * insert a new row into the Entity trackVisit | |
| * | |
| * @param int $affiliateCampainId | |
| * @param string $ipAddress | |
| */ | |
| public function trackVisit($affiliateCampainId, $ipAddress) | |
| { | |
| $visit = new trackVisit(); | |
| $visit->setIdentifier($affiliateCampainId); |
This file contains hidden or 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
| <SCRIPT language="JavaScript" type="text/javascript"> | |
| <!-- Yahoo! Search Marketing | |
| window.ysm_customData = new Object(); | |
| window.ysm_customData.conversion = "transId=1,currency=2,amount | |
| =3"; | |
| var ysm_accountid = "1TGFOC61CVR7IG61MK9SVDEMIDG"; | |
| document.write("<SCR" + "IPT language='JavaScript' type='text/ | |
| javascript' " | |
| + "SRC=//" + "qasrv1.wa.marketingsolutions.yahoo.com" + | |
| "/script/ScriptServlet" + "?aid=" + ysm_accountid |
This file contains hidden or 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
| framework: | |
| # ... | |
| templating: | |
| # ... | |
| packages: | |
| ## if you want to redirect just some asset remember to add also into twig file the package='rscf' | |
| rscf: | |
| base_urls: [%rackspace_container_url%] | |
| ## or use the generic: | |
| # assets_base_urls: |
This file contains hidden or 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/sh | |
| # in you /UsingGitHubAsAssetsCloudFiles/.git/hooks/post-commit | |
| git push origin master | |
This file contains hidden or 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 | |
| # $1 is the var | |
| # $2 is replace from | |
| # $3 is replace to | |
| EXPECTED_ARGS=3 | |
| E_BADARGS=65 | |
| HELP=$(cat <<EOF | |
| Usage with three arguments: | |
| `basename $0` /var/www/path/ typo type |
OlderNewer