TRUNCATE `log_customer`;
TRUNCATE `log_quote`;
TRUNCATE `log_summary`;
TRUNCATE `log_url`;
TRUNCATE `log_url_info`;
<html> | |
<body> | |
<p>Here are Webber’s points:</p> | |
<ul> | |
<li>If a method can be static, declare it static. Speed improvement is by a factor of 4.</li> | |
<li>echo is faster than print.(<em>* compare with list from phplens by John Lim</em>)</li> | |
<li>Use echo’s multiple parameters instead of string concatenation.</li> | |
<li>Set the maxvalue for your for-loops before and not in the loop.</li> | |
<li>Unset your variables to free memory, especially large arrays.</li> | |
<li>Avoid magic like __get, __set, __autoload</li> |
USE magentositedb; | |
TRUNCATE `magento_dataflow_batch_export`; | |
TRUNCATE `magento_dataflow_batch_import`; | |
TRUNCATE `magento_log_customer`; | |
TRUNCATE `magento_log_quote`; | |
TRUNCATE `magento_log_summary`; | |
TRUNCATE `magento_log_summary_type`; | |
TRUNCATE `magento_log_url`; | |
TRUNCATE `magento_log_url_info`; |
As is pretty obvious by my blog, GitHub repos and my job I'm a PHP developer. I'm also pretty adept with JavaScript and SQL. Lately I've been getting back into Java development a little more seriously. This gist is a series of short articles about some of the differences I've noticed between PHP and Java.
To be specific my Java development recently has been web development using Google App Engine. I am intending to create a RESTful API utilizing the language.
The differences discussed are not intended to be an indictment against either language. Some things about PHP I really like, some things about PHP I really dislike. The same goes for Java. Some things PHP is really good for and other things Java is really good for. This is not meant to be a religious war between languages.
I realize that in a way this is comparing apples and oranges. PHP is a dynamic, interpreted (althought yes it is still compiled) scripting language while Jav
After having many deadlocks due to a high order volumne I've applied the these fixes to the core. Some can be found in a Magento forum. Before the fixes we could only process 1 order every 5-10 secs. Updating to Magento 1.8 is currently not an option but in 1-2 months.
Mage_Sales_Model_Abstract::_afterSave
must be removed and replaced with afterCommitCallback
. This is important to move the grid update (of sales_flat_order_grid) out of the transaction.
Rewrite the method of the Mage_CatalogInventory_Model_Observer::reindexQuoteInventory()
to remove the price reindexing from the transaction. That index process will also be fired in event sales_model_service_quote_submit_success
.
<?xml version="1.0"?> | |
<!-- license --> | |
<config> | |
<global> | |
<!-- global config --> | |
</global> | |
<frontend> | |
<events> | |
<!-- disble logs --> | |
<controller_action_predispatch> |
javascript | |
ES6ValidationInspection | |
JSAccessibilityCheckInspection | |
JSBitwiseOperatorUsageInspection | |
JSCheckFunctionSignaturesInspection | |
JSClosureCompilerSyntaxInspection | |
JSCommentMatchesSignatureInspection | |
JSComparisonWithNaNInspection | |
JSConsecutiveCommasInArrayLiteralInspection |
Google cloud's ssh command lets you pass standard ssh flags. To, for example, forward local port 8088 to port 8088 on a vm instance, all you need to do is:
gcloud compute ssh --ssh-flag="-L 8088:localhost:8088" --zone "us-central1-b" "example_instance_name"
Now browsing to localhost:8088 works as it would with standard ssh.
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[1;31m\]\u\[\033[1;37m\]@\[\033[1;32m\]\h\[\033[1;37m\]:\[\033[1;36m\]\w \[\033[1;35m\]$(parse_git_branch) \[\033[1;33m\]\$ \[\033[0m\]' |