Skip to content

Instantly share code, notes, and snippets.

Avatar

Achim Rosenhagen arosenhagen

View GitHub Profile
@arosenhagen
arosenhagen / exception.php
Last active May 9, 2018 — forked from abtris/exception.php
Magento How To Show Full Error/Exception Message Instead of Truncated One
View exception.php
<?php
function getExceptionTraceAsString($exception) {
$rtn = "";
$count = 0;
foreach ($exception->getTrace() as $frame) {
$args = "";
if (isset($frame['args'])) {
$args = array();
foreach ($frame['args'] as $arg) {
if (is_string($arg)) {
@arosenhagen
arosenhagen / gist:8aaf5d7f94171778c0e9
Last active Feb 16, 2021 — forked from supairish/gist:2951524
[nginx] limit requests from searchengine crawlers/bots to 1r/m (prevent DDOS)
View gist:8aaf5d7f94171778c0e9
http {
map $http_user_agent $limit_bots {
default '';
~*(bing|yandex|msnbot) $binary_remote_addr;
}
limit_req_zone $limit_bots zone=bots:10m rate=1r/m;
server {
@arosenhagen
arosenhagen / gist:2621618
Created May 6, 2012 — forked from astorm/gist:992233
[magento] - fix console.log
View gist:2621618

fix console.log

Information

Remember to remove before deployment, as some users report it makes IE 7 crash

Layout.xml