Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
#!/bin/sh | |
DIR="$(dirname $(readlink -f $0))" | |
cd $DIR | |
wget https://www.cloudflare.com/ips-v4 -O ips-v4.tmp | |
wget https://www.cloudflare.com/ips-v6 -O ips-v6.tmp | |
mv ips-v4.tmp ips-v4 | |
mv ips-v6.tmp ips-v6 | |
for cfip in `cat ips-v4`; do ufw allow from $cfip; done |
#!/bin/sh | |
DIR="$(dirname $(readlink -f $0))" | |
cd $DIR | |
wget https://www.cloudflare.com/ips-v4 -O ips-v4.tmp | |
wget https://www.cloudflare.com/ips-v6 -O ips-v6.tmp | |
mv ips-v4.tmp ips-v4 | |
mv ips-v6.tmp ips-v6 | |
for cfip in `cat ips-v4`; do ufw allow from $cfip; done |
SET @table=(SELECT DATABASE()); | |
select @table; | |
SELECT | |
table_schema as `Database`, | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES | |
WHERE table_schema = @table | |
ORDER BY (data_length + index_length) DESC; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bootstrap 3 vertically centered modal and scroll fixes</title> | |
<meta name="description" content="Bootstrap 3 vertically centered modal and scroll fixes"> | |
<!-- include bootstrap --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> | |
<style id="jsbin-css"> | |
/* scroll fixes */ |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
INSERT INTO `core_config_data` (`config_id`, `scope`, `scope_id`, `path`, `value`) VALUES | |
(null, 'default', 0, 'dev/debug/template_hints', '1'), | |
(null, 'default', 0, 'dev/debug/template_hints_blocks', '1'); #creates | |
SELECT * from `core_config_data` where (`scope` = 'default' and `scope_id` = 0 and `path` LIKE 'dev/debug/template_hints%'); #verifies | |
UPDATE `core_config_data` SET `value` = '0' where `scope` = 'default' and `scope_id` = 0 and `path` LIKE 'dev/debug/template_hints%'; #disables | |
UPDATE `core_config_data` SET `value` = '1' where `scope` = 'default' and `scope_id` = 0 and `path` LIKE 'dev/debug/template_hints%'; #enables |
function getCategories(Mage_Catalog_Model_Category $ParentCategory, $id_only = false, $active = true) { | |
$return = array(); | |
foreach(explode(',', $ParentCategory->getChildren()) as $categoryId) { | |
$Category = Mage::getModel('catalog/category')->load($categoryId); | |
if ($Category->getIsActive()) { | |
if ($id_only) { | |
$return[] = $categoryId; | |
} else { | |
$return[$categoryId] = array( |
#!/bin/bash | |
IGNORE_TABLES=( dataflow_batch_export dataflow_batch_import log_customer log_quote log_summary log_summary_type log_url log_url_info log_visitor log_visitor_info log_visitor_online report_event index_event enterprise_logging_event_changes core_cache core_cache_tag core_session core_cache_tag ) | |
IGNORE_TABLES_AGGRESSIVE=( report_compared_product_index report_viewed_product_index sales_flat_quote_address sales_flat_quote_shipping_rate enterprise_customer_sales_flat_quote enterprise_customer_sales_flat_quote_address sales_flat_quote ) | |
TRUNCATE_TABLES=( dataflow_batch_export dataflow_batch_import log_customer log_quote log_summary log_summary_type log_url log_url_info log_visitor log_visitor_info log_visitor_online report_viewed_product_index report_compared_product_index report_event index_event index_process_event ) | |
CONFIG_FILE="./app/etc/local.xml" | |
DUMP_FILE="./var/db.sql" | |
function usage() | |
{ |
<?php | |
// Updated the "HOW DO I KNOW IF MY SERVER MEETS THESE SYSTEM REQUIREMENTS" | |
// from http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento | |
// specified at http://magento.com/resources/system-requirements | |
// | |
// minor adjustments made from original script | |
// http://www.magentocommerce.com/_media/magento-check.zip | |
extension_check(array( | |
'curl', | |
'dom', |