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
Brain1:/repo/app-brain# wget -d http://brain/ | |
DEBUG output created by Wget 1.11.4 on linux-gnu. | |
--2011-03-20 01:04:07-- http://brain/ | |
Resolving brain... 127.0.0.1 | |
Caching brain => 127.0.0.1 | |
Connecting to brain|127.0.0.1|:80... connected. | |
Created socket 3. | |
Releasing 0x0000000001809880 (new refcount 1). |
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
server { | |
listen 80; ## listen for ipv4 | |
server_name brain brain.us.to; | |
access_log /var/log/nginx/localhost.access.log; | |
location / { | |
root /repo/app-brain/www; | |
index index.php; | |
} | |
location ~ \.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
/** | |
* @ManyToMany(targetEntity="Keyword", mappedBy="blogs", cascade={"all"}, fetch="EXTRA_LAZY") | |
*/ | |
protected $keywords; |
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
params = [] | |
i = 0 | |
l = arguments.length | |
while i < l | |
params[i] = core.trait(arguments[i]) | |
++i |
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
<? | |
$list_a = array(); | |
$list_b = array(); | |
foreach($products as $i => $product) { | |
$column = ($i % 2) + 1; | |
if($column === 1) $a[] = $product; | |
else if($column === 2) $b[] = $product; | |
} |
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
<li> | |
<div id="related_vehicle_list" class="clear"> | |
<? $this->viewPath = PATH_APP.'/modules/auto/controllers/auto_vehicles'; $this->renderPartial('related_vehicle_list'); ?> | |
</div> | |
<p class="addDocument img_noBottomPading"><a href="#" onclick="new PopupForm('onCustomEvent', {ajaxFields: get_ajax_fields() }); return false;">Add vehicle(s)</a></p> | |
<input type="hidden" name="related_vehicle_id" id="related_vehicle_id" value=""/> | |
<input type="hidden" name="add_related_vehicle_mode" value="1"/> | |
<script type="text/javascript"> |
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
MyClass::create_dummy_shipment(array( | |
'order' => $order | |
)); | |
... | |
public static function create_dummy_shipment($params = array()) { | |
$params['order'] = Shop_Order::create()->order("rand() desc")->find(); | |
extract(UnitTest_Helper::validate_parameters(array( |
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
class URI { | |
public static function sanitize($url) { | |
if(!$url) | |
return; | |
$url = str_replace('www.', '', trim(strtolower($url))); | |
preg_match('#^([a-zA-Z0-9:/_.-]*).*$#m', $url, $m1); | |
$url = $m1[1]; |
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 testclass { | |
protected $_r; | |
public function __construct() { | |
$this->getr(); |
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 testclass { | |
protected $_r; | |
public function __construct() { | |
$this->getr(); |