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
backend default { | |
.host = "127.0.0.1"; | |
.port = "80"; | |
} | |
acl purge { | |
"localhost"; | |
"<external-ip>"; | |
} | |
sub vcl_recv { |
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
backend default { | |
.host = "127.0.0.1"; | |
.port = "80"; | |
} | |
acl purge { | |
"localhost"; | |
"69.195.222.132"; | |
} | |
sub vcl_recv { |
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 | |
function validateProducts($products) { | |
// Check to make sure that our valid fields are in there | |
$requiredFields = array( | |
'price', | |
'name', | |
'description', | |
'type', |
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 | |
function validateProducts($storeData) { | |
// Check to make sure that our valid fields are in there | |
$requiredFields = array( | |
'price', | |
'name', | |
'description', | |
'type', |
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 App\Entity; | |
//Import Annotations | |
use DMS\Filter\Rules as Filter; | |
class User | |
{ |
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 | |
/* | |
* This file is part of the Silex framework. | |
* | |
* (c) Fabien Potencier <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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 | |
class A | |
{ | |
public function doFirst() | |
{ | |
return $this->doSecond(); | |
} | |
private function doSecond() |
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 | |
//Original code | |
$this->setProperty( $data['property'] ); | |
//How it has to be done because array may not contain that value (its optional) | |
$this->setProperty( isset($data['property'])? $data['property'] : null ); | |
/* | |
* Question is: Is there a cleaner way of doing this, if so, how? |
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
in ERB template: <% link_to "Contato", :controller => "nerdtrack", :action => "contato" %> | |
on regular pages its ok, but on Clearance pages i get this: | |
- http://0.0.0.0:3000/clearance/nerdtrack/contato | |
instead of | |
- http://0.0.0.0:3000/nerdtrack/contato |
NewerOlder