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
find . -type d -exec chmod 775 {} \; | |
find . -type f -exec chmod 664 {} \; | |
chmod 775 -R var/ app/etc/ media/ |
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 | |
// This script is to solve the problem of doing database search and replace | |
// when developers have only gone and used the non-relational concept of | |
// serializing PHP arrays into single database columns. It will search for all | |
// matching data on the database and change it, even if it's within a serialized | |
// PHP array. | |
// The big problem with serialised arrays is that if you do a normal DB | |
// style search and replace the lengths get mucked up. This search deals with |
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 | |
// cleanup.php?clean=var | |
// cleanup.php?clean=log | |
$xml = simplexml_load_file('./app/etc/local.xml', NULL, LIBXML_NOCDATA); | |
$db['host'] = $xml->global->resources->default_setup->connection->host; | |
$db['name'] = $xml->global->resources->default_setup->connection->dbname; | |
$db['user'] = $xml->global->resources->default_setup->connection->username; |
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 | |
$product=Mage::getModel("catalog/product"); | |
$prod=$product->load($_product->getId()); | |
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($prod); | |
$col = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions(); | |
$total_qty=0; | |
foreach($col as $sprod){ | |
$sprod=$product->load($sprod->getId()); |
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
elasticsearch - http://www.elasticsearch.org/ | |
riako - http://docs.basho.com/ | |
redis - http://redis.io/ | |
graylog2 - http://graylog2.org/ | |
rabbitMQ - http://www.rabbitmq.com/ | |
http://requestb.in/ | |
angularjs http://www.angularjs.org |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* CodeIgniter | |
* | |
* An open source application development framework for PHP 5.1.6 or newer | |
* | |
* @package CodeIgniter | |
* @author ExpressionEngine Dev Team | |
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. | |
* @license http://codeigniter.com/user_guide/license.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
/* Javascript Helper functions */ | |
var MDHelperFx={ | |
toCurrency:function(amount){ | |
_amount = amount.toString(); | |
return _amount.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,") ; | |
} | |
} | |
// Usage: | |
// MDHelperFx.toCurrency(amount); |
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 | |
include 'classes/simple_html_dom.php'; | |
$html = file_get_html('http://www.wheel-size.com/'); | |
$ret = $html->find('div[class=brand-icons] a'); | |
$site_url = "http://www.wheel-size.com"; | |
$wheel = array(); | |
$modelelement = ""; | |
$i = 0; | |
$csvdata = array(); | |
$csvdata[] = array("Make","Year","Model","Tyre Size"); |
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
<!-- ==================== BEGIN TAO VSL ================= --> | |
<!-- Offer Goal Conversion: Accelerated Seduction Program --> | |
<iframe src="https://badass.go2cloud.org/GL8" scrolling="no" frameborder="0" width="1" height="1"></iframe> | |
<!-- // End Offer Goal Conversion --> | |
<!-- ==================== END TAO VSL ================= --> | |
<!-- ==================== BEGIN FAW VSL (08122013) ================= --> | |
<!-- Offer Goal Conversion: Accelerated Seduction Program --> | |
<iframe src="https://www.trueclick.me/GLc" scrolling="no" frameborder="0" width="1" height="1"></iframe> | |
<!-- // End Offer Goal Conversion --> |