Skip to content

Instantly share code, notes, and snippets.

View tiagones's full-sized avatar

Tiago P Dantas tiagones

View GitHub Profile
@tiagones
tiagones / magento-db-cleanup.sql
Created July 25, 2016 13:57 — forked from therouv/magento-db-cleanup.sql
DB cleanup script for Magento with some common database tables.
SET FOREIGN_KEY_CHECKS=0;
-- Customers
TRUNCATE `customer_entity`;
TRUNCATE `customer_entity_datetime`;
TRUNCATE `customer_entity_decimal`;
TRUNCATE `customer_entity_int`;
TRUNCATE `customer_entity_text`;
TRUNCATE `customer_entity_varchar`;
@tiagones
tiagones / cleanup.php
Created August 28, 2015 15:42 — forked from mkdizajn/magento var and mysql log cleanup script
Magneto Log & Cache Maintenance Script
<?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;
@tiagones
tiagones / tinydump.php
Last active August 29, 2015 14:05 — forked from ceckoslab/tinydump
<?php
define('DS', DIRECTORY_SEPARATOR);
function _getExtractSchemaStatement($sqlFileName, $db)
{
$dumpSchema = 'mysqldump' . ' ';
$dumpSchema .= '--no-data' . ' ';
$dumpSchema .= '-u ' . $db['user'] . ' ';
$dumpSchema .= '-p' . $db['pass'] . ' ';
$dumpSchema .= '-h ' . $db['host'] . ' ';
<?xml version="1.0"?>
<layout>
<default>
<!--Root/Default Layouts-->
<reference name="root">
<!--Appending Block-->
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</reference>
<!--CSS and JS Files-->