Water shader using Three.js, Orbit Controls & TweenMax.
A Pen by Arnaud Rocca on CodePen.
| import MySQLdb, sys, time | |
| # Lists out unused attribute options in a Magento DB | |
| # This script generates an SQL query you can use but doesn't make any changes | |
| # to DB on its own | |
| db = MySQLdb.connect( | |
| host="localhost", | |
| user="root", | |
| passwd="", |
| <?php | |
| // Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored) | |
| // http://youtu.be/dQw4w9WgXcQ | |
| // http://www.youtube.com/embed/dQw4w9WgXcQ | |
| // http://www.youtube.com/watch?v=dQw4w9WgXcQ | |
| // http://www.youtube.com/?v=dQw4w9WgXcQ | |
| // http://www.youtube.com/v/dQw4w9WgXcQ | |
| // http://www.youtube.com/e/dQw4w9WgXcQ | |
| // http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ |
| SET FOREIGN_KEY_CHECKS=0; | |
| -- Customers | |
| TRUNCATE `customer_address_entity`; | |
| TRUNCATE `customer_address_entity_datetime`; | |
| TRUNCATE `customer_address_entity_decimal`; | |
| TRUNCATE `customer_address_entity_int`; | |
| TRUNCATE `customer_address_entity_text`; | |
| TRUNCATE `customer_address_entity_varchar`; | |
| TRUNCATE `customer_entity`; |
| <?php | |
| require_once 'app/Mage.php'; | |
| Mage::app(); | |
| Mage::app()->getStore()->setId(Mage_Core_Model_App::ADMIN_STORE_ID); | |
| $products = Mage::getModel('catalog/product')->getCollection(); | |
| //->addAttributeToFilter('entity_id', array('gt' => 14000)); | |
| $mediaApi = Mage::getModel("catalog/product_attribute_media_api"); |
Water shader using Three.js, Orbit Controls & TweenMax.
A Pen by Arnaud Rocca on CodePen.
| #!/bin/bash | |
| # VARIABLES | |
| CONFIG_FILE="./app/etc/local.xml" | |
| DUMP_FILE="./var/db-sales-users.sql" | |
| TABLES="sales_bestsellers_aggregated_daily sales_bestsellers_aggregated_monthly sales_bestsellers_aggregated_yearly sales_billing_agreement sales_billing_agreement_order sales_flat_creditmemo sales_flat_creditmemo_comment sales_flat_creditmemo_grid sales_flat_creditmemo_item sales_flat_invoice sales_flat_invoice_comment sales_flat_invoice_grid sales_flat_invoice_item sales_flat_order sales_flat_order_address sales_flat_order_grid sales_flat_order_item sales_flat_order_payment sales_flat_order_status_history sales_flat_quote sales_flat_quote_address_item sales_flat_quote_item sales_flat_quote_item_option sales_flat_quote_payment sales_flat_quote_shipping_rate | |
| sales_flat_shipment sales_flat_shipment_comment sales_flat_shipment_grid sales_flat_shipment_item sales_flat_shipment_track sales_invoiced_aggregated sales_invoiced_aggregated_order sales_order_aggregated_created sales_order_aggregated_updated sales_order_statu |
| #!/bin/bash | |
| # VARIABLES | |
| CONFIG_FILE="./app/etc/local.xml" | |
| DUMP_FILE="./var/db-sales-users.sql" | |
| TABLES="sales_bestsellers_aggregated_daily sales_bestsellers_aggregated_monthly sales_bestsellers_aggregated_yearly sales_billing_agreement sales_billing_agreement_order sales_flat_creditmemo sales_flat_creditmemo_comment sales_flat_creditmemo_grid sales_flat_creditmemo_item sales_flat_invoice sales_flat_invoice_comment sales_flat_invoice_grid sales_flat_invoice_item sales_flat_order sales_flat_order_address sales_flat_order_grid sales_flat_order_item sales_flat_order_payment sales_flat_order_status_history sales_flat_quote sales_flat_quote_address_item sales_flat_quote_item sales_flat_quote_item_option sales_flat_quote_payment sales_flat_quote_shipping_rate | |
| sales_flat_shipment sales_flat_shipment_comment sales_flat_shipment_grid sales_flat_shipment_item sales_flat_shipment_track sales_invoiced_aggregated sales_invoiced_aggregated_order sales_order_aggregated_created sales_order_aggregated_updated sales_order_statu |
| <?php | |
| //Table names and table prefixes | |
| $tableName = Mage::getSingleton('core/resource') | |
| getTableName('catalog_product_entity'); | |
| // if prefix was 'mage_' then the below statement | |
| // would print out mage_catalog_product_entity | |
| echo $tableName; | |
| //Accessing the database connection resource |
| <?php | |
| //Table names and table prefixes | |
| $tableName = Mage::getSingleton('core/resource') | |
| getTableName('catalog_product_entity'); | |
| // if prefix was 'mage_' then the below statement | |
| // would print out mage_catalog_product_entity | |
| echo $tableName; | |
| //Accessing the database connection resource |
| #!/bin/bash | |
| # | |
| # Found on StackOverflow: | |
| # http://stackoverflow.com/a/9304264/3765 | |
| # | |
| if [ ! -f ./app/etc/local.xml.template ]; then | |
| echo "-- ERROR" | |
| echo "-- This doesn't look like a Magento install. Please make sure" | |
| echo "-- that you are running this from the Magento main doc root dir" |