- Download and make it executable
wget https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
sudo cp MailHog_linux_amd64 /usr/local/bin/mailhog
sudo chmod +x /usr/local/bin/mailhog
- Make MailHog as a service
find -L app/design/frontend -regex '.*\(shipping\|billing\|shipping_method\|payment\).phtml' -exec grep -L formkey {} \; \ | |
| xargs sed -i 's/<\/form>/<?php echo $this->getBlockHtml("formkey") ?><\/form>/g' | |
find -L skin/frontend -name 'opcheckout.js' -exec grep -L form_key {} \; \ | |
| xargs sed -i 's/if (elements\[i\].name=='\''payment\[method\]'\'') {/if (elements[i].name=='\''payment[method]'\'' || elements[i].name == '\''form_key'\'') {/g' |
- name: create a local temp directory | |
local_action: | |
module: command mktemp -d "{{ lookup('env', 'TMPDIR') | default('/tmp/') }}ansible.XXXX" | |
register: mktemp_output |
Sometimes you may have a run away reindex process that aborted due to a MySQL connection error of some sorts. It may be useful to use the following MySQL commands to aid in debugging.
Magento Enterprise labels the reindex lock via the constant REINDEX_FULL_LOCK in app/code/core/Enterprise/Index/Model/Observer.php
SELECT IS_FREE_LOCK('mydatabase_name.reindex_full')
Returns 1 is specified lock is free and can be acquired, 0 if it’s in use, NULL if an error occurs.
<?php | |
/** | |
* Class CaseConverter | |
* | |
* Library for camelCase/StudlyCase/snake_case conversions. | |
*/ | |
class CaseConverter { | |
/** |
location /api { | |
rewrite ^/api/rest /api.php?type=rest last; | |
rewrite ^/api/v2_soap /api.php?type=v2_soap last; | |
rewrite ^/api/soap /api.php?type=soap last; | |
} |
Commit = Struct.new(:repo, :sha, :comment, :stats) do | |
def refactoring?(previous_commit) | |
return :spec_files_unchanged if no_changes_to_specs | |
return :comment if refactoring_comment | |
return false if result.nil? || result.failed > 0 || result.total == 0 | |
return :spec_results_unchanged if result == previous_commit.result | |
return false | |
end | |
def no_changes_to_specs |