Skip to content

Instantly share code, notes, and snippets.

View oralunal's full-sized avatar

Oral ÜNAL oralunal

View GitHub Profile
@oralunal
oralunal / dump.sh
Created October 31, 2025 08:56 — forked from o5/dump.sh
MySQL / MariaDB Dump Helper
#!/usr/bin/env bash
# MySQL / MariaDB Dump Helper
# ===========================
# FEATURES: Progress bar with ETA, support multiple databases (dump into separated files) and password as argument
# REQUIREMENTS:
# =============
# GNU Core Utilities, mysql, mysqldump, pv (https://github.com/icetee/pv)
@oralunal
oralunal / suspicious.conf
Last active November 2, 2026 23:02
Fail2Ban filter for suspicious accesses
# Fail2Ban filter for suspicious accesses
# Detects access to common backdoor/shell PHP and environment files, detects bots
# Author: @oralunal
#
# Log format: nginx/apache "combined"
# <IP> - <user> [<date>] "<request>" <status> <bytes> "<referer>" "<user-agent>" [extra fields]
# Fields are located by position from the left ([^"]* cannot cross a quote), so the
# filter also works when extra fields such as "$http_x_forwarded_for" follow the UA.
# Note: a literal % must be written as %% in this file (config interpolation).
a:5:{i:0;s:97:"Invalid method Mage_Catalog_Block_Product_View_Type_Simple::displayProductStockStatus(Array
(
)
)";i:1;s:4373:"#0 /home/testtest/public_html/app/design/frontend/perfectus/unicase/template/catalog/product/view/type/availability/default.phtml(27): Varien_Object->__call('displayProductS...', Array)
#1 /home/testtest/public_html/app/design/frontend/perfectus/unicase/template/catalog/product/view/type/availability/default.phtml(27): Mage_Catalog_Block_Product_View_Type_Simple->displayProductStockStatus()
#2 /home/testtest/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/testtest/...')
#3 /home/testtest/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/perfec...')
#4 /home/testtest/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#5 /home/testtest/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#6 /home/testtest/public_
@oralunal
oralunal / 475501241399
Created August 10, 2018 04:41
Error Log
a:5:{i:0;s:111:"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'testtest_mag.mag_perfectus_mainslider' doesn't exist";i:1;s:5751:"#0 /home/testtest/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/testtest/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/testtest/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/testtest/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT COUNT(*)...', Array)
#4 /home/testtest/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SELECT COUNT(*)...', Array)
#5 /home/testtest/public_html/lib/Zend/Db/Adapter/Abstract.php(825): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/testtest/public_html/lib/Varien/Data/Collection/Db.php(225): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select), Array)
#7 /home/tes
@oralunal
oralunal / watchers.xml
Last active September 2, 2017 17:46 — forked from shibby/watchers.xml
<?xml version="1.0" encoding="UTF-8"?>
<TaskOptions>
<TaskOptions>
<option name="arguments" value="fix $FileDir$/$FileName$ --rules=@PSR2" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" value="fix code style" />
<option name="exitCodeBehavior" value="NEVER" />
<option name="fileExtension" value="php" />
<option name="immediateSync" value="false" />
<option name="name" value="php-cs-fixer" />
@oralunal
oralunal / default.vcl
Created January 9, 2017 21:15 — forked from derekclee/default.vcl
Varnish Cache Set CORS headers
sub vcl_deliver {
if (req.url ~ "/fonts/") {
set resp.http.Access-Control-Allow-Origin = "*";
set resp.http.Access-Control-Allow-Methods = "GET, OPTIONS";
set resp.http.Access-Control-Allow-Headers = "Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token";
}
}