Skip to content

Instantly share code, notes, and snippets.

View tiagones's full-sized avatar

Tiago P Dantas tiagones

View GitHub Profile
<?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-->
@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'] . ' ';
@tiagones
tiagones / robots.txt
Last active August 29, 2015 14:05
Robots.txt Magento Boilerplate
# Google Image Crawler Setup
User-agent: Googlebot-Image
Disallow: /
Allow: /media/catalog/product/
# Yahoo! Multimedia Crawler Setup
User-agent: yahoo-mmcrawler
Disallow: /
Allow: /media/catalog/product/
@tiagones
tiagones / humans.txt
Created August 8, 2014 02:00
humans.txt from HTML5 ★ BOILERPLATE
# humanstxt.org/
# The humans responsible & technology colophon
# TEAM
<name> -- <role> -- <twitter>
# THANKS
<name>
@tiagones
tiagones / projeto.sublime-project
Last active August 29, 2015 14:25
Projeto Sublime Text
{
"folders":
[
{
"path": "app/design/frontend/default/dhcpv5",
"name": "app/design/frontend/default/dhcpv5"
},
{
"path": "skin/frontend/default/dhcpv5",
"name": "skin/frontend/default/dhcpv5"
@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 / magento-cleanup.php
Created August 28, 2015 18:01
Magneto clean Up Tool
<?php
## Function to set file permissions to 0644 and folder permissions to 0755
function AllDirChmod( $dir = "./", $dirModes = 0755, $fileModes = 0644 ){
$d = new RecursiveDirectoryIterator( $dir );
foreach( new RecursiveIteratorIterator( $d, 1 ) as $path ){
if( $path->isDir() ) chmod( $path, $dirModes );
else if( is_file( $path ) ) chmod( $path, $fileModes );
}
@tiagones
tiagones / transaction-email-variables
Created September 29, 2015 17:55
Magento - Transaction Email Variables
Para a inscrição:
1. {{var customer}} irá imprimir todas as informações do cliente
2. {{var customer.ID}}
3. {{var customer.email}}
4. {{var customer.firstname}}
5. {{var customer.lastname}}
6. {{var customer.name}}
7. {{var customer.password}}
8. {{var customer.created_in}}
<?php
##Test What Exact Version PHP & MySQL
echo "<h2>Exact Version PHP & MySQL: </h2>";
printf("PHP version: %s\n", PHP_VERSION);
$mysql = mysqli_connect('localhost', 'root', '');
## Test the MySQL connection
if (mysqli_connect_errno()) {
printf("</br> Connection failed: %s\n", mysqli_connect_error());
exit();
}
{
"directory": "assets/_src/bower_components/",
"scripts": {
"postinstall": "./bower-postinstall.bat"
}
}