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
sudo ./configure --prefix=/opt/php-5.4.19 --enable-mbstring --enable-soap --with-curl --with-mcrypt --with-gd --with-zlib --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-openssl --with-imap --with-imap-ssl --enable-fpm --with-kerberos | |
#compiling php5.3 gives error, work around with: | |
sed -i '/^BUILD_/ s/\$(CC)/\$(CXX)/g' Makefile |
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 'app/Mage.php'; | |
Mage::app('admin','store'); | |
Mage::registry('isSecureArea'); | |
/** @var Mage_Customer_Model_Customer */ | |
$customer = Mage::getModel('customer/customer')->load($_GET['customer']); | |
$customer->sendNewAccountEmail(); | |
echo 'finished'; |
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
package {'php': | |
ensure => present, | |
before => File['/etc/php.ini'], | |
} | |
file {'/etc/php.ini': | |
ensure => file, | |
} | |
package {'httpd': |
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
#!/usr/bin/perl -w # camel code | |
use strict; | |
$_='ev | |
al("seek\040D | |
ATA,0, 0;");foreach(1..3) | |
{<DATA>;}my @camel1hump;my$camel; | |
my$Camel ;while( <DATA>){$_=sprintf("%-6 | |
9s",$_);my@dromedary 1=split(//);if(defined($ | |
_=<DATA>)){@camel1hum p=split(//);}while(@dromeda |
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://www.kingletas.com/2012/09/magento-developers-toolbox-v2-0.html | |
http://www.kingletas.com/2013/04/advanced-vagrant-use-with-puppet.html |
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 'app/Mage.php'; | |
Mage::app('admin','store'); | |
Mage::registry('isSecureArea'); | |
for($i = 101; $i <= 200; $i++) { | |
$websiteName = 'test'.$i; | |
$storeName = 'test'.$i; |
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 | |
// in the config for any module, you can map routes to their appropriate layout | |
'route_layouts'=>array( | |
'home'=>'layout/layout-2col-left.phtml', | |
'category'=>'layout/layout-2col-left.phtml', | |
); | |
// A later module could override the previous configuration |
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 | |
public function onBootstrap(MvcEvent $e) | |
{ | |
/** add categories to sidebar on every request */ | |
$e->getApplication()->getEventManager()->attach(MvcEvent::EVENT_RENDER, function() use($e) { | |
$sm = $e->getApplication()->getServiceManager(); | |
/** Only add it if the layout actually has a left column */ |
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 'app/Mage.php'; | |
Mage::app(); | |
$quote = Mage::getModel('sales/quote') | |
->setStoreId(Mage::app()->getStore('default')->getId()); | |
$product = Mage::getModel('catalog/product')->load(6); /* 6 => Some product 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
/** @AfterScenario */ | |
public function after($event) | |
{ | |
if(4==$event->getResult()) { | |
var_dump($this->getSession()->getPage()->getContent()); | |
} | |
} |