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 -> command to execute | |
WPPATH=$(pwd) | |
sudo -u www-data -i -- wp $@ --path=$WPPATH |
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 | |
if ( array_key_exists('freeshipping', $_shippingRateGroups )) { | |
$_shippingRateGroups = array('freeshipping' => $_shippingRateGroups['freeshipping']); | |
} | |
?> |
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 | |
EXPECTED_ARGS=3 | |
E_BADARGS=65 | |
MYSQL=`which mysql` | |
Q1="CREATE DATABASE IF NOT EXISTS $1;" | |
Q2="CREATE USER '$2'@'localhost' IDENTIFIED BY '$3';" | |
Q3="GRANT ALL PRIVILEGES ON $1.* TO '$2'@'localhost' WITH GRANT OPTION;" | |
Q4="FLUSH PRIVILEGES;" |
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 CompanyName_ModuleName_Block_BlockName extends Mage_Core_Block_Template | |
{ | |
protected function _construct(){ | |
parent::_construct(); | |
} | |
} |
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 | |
$dom = new Zend_Dom_Query($blockHTML); | |
$images = $dom->query('img'); | |
?> |
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 | |
Zend_Debug::dump($var); | |
?> |
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
mkfile 50m test.tmp |
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 | |
$hook_name = 'hook'; | |
global $wp_filter; | |
var_dump( $wp_filter[$hook_name] ); | |
?> |