Skip to content

Instantly share code, notes, and snippets.

View oralunal's full-sized avatar

Oral ÜNAL oralunal

View GitHub Profile
@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";
}
}
@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 / 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
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 / request-with-credentials.js
Created March 8, 2024 01:52 — forked from jfolds/request-with-credentials.js
API request with credentials via fetch/xhr/jquery
const apiBaseUrl 'https://localhost/some/api';
/** fetch */
window.fetch(`${apiBaseUrl}`, {
credentials: 'include'
})
.then(json)
.then((data) => {
console.log(data);
});
/** XHR */