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 outputs an array of file hashes recursively for the current directory. | |
* Useful for generating hashlist for security scanning programs | |
* | |
*/ | |
function recursive_md5($dir, $types = null, $recursive = true, $baseDir = '') | |
{ | |
$to_ignore = array( | |
'.', |
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 | |
$database_host = "localhost"; | |
$database_user = "username"; | |
$database_password = "password"; | |
$magento_database = "databasename"; | |
$table_prefix = "prefixhere_"; | |
$dryrun = true; // change to false when you want to commit changes | |
$db = mysql_connect($database_host, $database_user, $database_password); |
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 | |
// shell/listAllCron.php | |
require_once 'abstract.php'; | |
class Mage_Shell_CronLister extends Mage_Shell_Abstract | |
{ | |
public function run() | |
{ | |
$cronJobs = Mage::app()->getConfig()->getNode('crontab/jobs'); |
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 . -name "*.phtml" -print | xargs grep --color=auto -iRnH "Mage::getModel(" | |
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "Mage::getResourceModel(" | |
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "Mage::getSingleton(" | |
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "SELECT.*FROM.*;[\"\']" | |
find . -name "*.php" -print | xargs grep --color=auto -iRnH "htmlEscape(" | |
find ./app/code/local -name "*.php" -print | xargs grep --color=auto -iRnH "htmlEscape(" | |
find ./app/code/local -name "*/Block/*.phtml" -print | xargs grep --color=auto -iRnH "SELECT.*FROM.*;[\"\']" | |
find ./app/code/local -name "*.php" -print | xargs grep --color=auto -iRnH "\$_[GET|REQUEST|SERVER|POST]" | |
find ./app/code/local -name "*.php" -print | xargs grep --color=auto -iRnH "public _construct" | |
find . -name "*.php" -print | xargs grep --color=auto -iRnH "public _construct" |
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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `catalog_product_bundle_option`; | |
TRUNCATE TABLE `catalog_product_bundle_option_value`; | |
TRUNCATE TABLE `catalog_product_bundle_price_index`; | |
TRUNCATE TABLE `catalog_product_bundle_selection`; | |
TRUNCATE TABLE `catalog_product_bundle_selection_price`; | |
TRUNCATE TABLE `catalog_product_bundle_stock_index`; | |
TRUNCATE TABLE `catalog_product_entity_datetime`; | |
TRUNCATE TABLE `catalog_product_entity_decimal`; | |
TRUNCATE TABLE `catalog_product_entity_gallery`; |
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
#!/bin/env bash | |
# | |
# Example use: Add the following line to your crontab to run the script on a daily basis. | |
# | |
# 1 6 * * * ~/bin/compare_and_email.sh <full_path_to_webroot> "Email Subject Line" "user@example.com user2@example.com" | |
# | |
date=`date +%Y%m%d` | |
gitdir="$1" | |
subject="$2" |
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
<?xml version="1.0"?> | |
<config> | |
<frontend> | |
<events> | |
<!-- disble logs --> | |
<controller_action_predispatch> | |
<observers><log><type>disabled</type></log></observers> | |
</controller_action_predispatch> | |
<controller_action_postdispatch> | |
<observers><log><type>disabled</type></log></observers> |
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
composer config repositories.alger/phpworld-talk2 vcs git@github.com:davidalger/phpworld-talk2.git | |
composer require alger/module-skeleton:dev-master | |
bin/magento setup:upgrade -q && bin/magento cache:flush -q | |
# OR | |
git clone git@github.com:davidalger/phpworld-talk2.git app/code/Alger/Skeleton | |
bin/magento module:enable Alger_Skeleton | |
bin/magento setup:upgrade -q && bin/magento cache:flush -q |
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
#!/bin/sh | |
# jnewfiles | |
# Detects new and changed php and html files last xxx minutes | |
# (C) 2014 Rene Kreijveld, enail [at] renekreijveld [dot] nl | |
# Update 31-12-2013: only send email when changes are found | |
# Update 04-02-2014: check for new files last three hours | |
# Update 05-05-2014: check for new html files also | |
# Update 07-05-2014: filter out ju_chached and DirectAdmin stats folders in html files |
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
#!/bin/sh | |
# jnewfiles | |
# Detects new and changed php and html files last xxx minutes | |
# (C) 2014 Rene Kreijveld, enail [at] renekreijveld [dot] nl | |
# Update 31-12-2013: only send email when changes are found | |
# Update 04-02-2014: check for new files last three hours | |
# Update 05-05-2014: check for new html files also | |
# Update 07-05-2014: filter out ju_chached and DirectAdmin stats folders in html files |
OlderNewer