Skip to content

Instantly share code, notes, and snippets.

View nkajic's full-sized avatar

Neven Kajić nkajic

  • Zagreb, Croatia
View GitHub Profile
unirgy /
Last active November 30, 2017 16:56



This is a proposal for PHP extension to disable running unapproved PHP code, uploaded using security holes or by any other means.


  1. Master key is saved in php.ini (hidden in phpinfo)
  2. Signatures are saved in a file that lives in web or app root folder, 1 line per file/signature
hidonet / magento.stpl
Last active September 23, 2019 12:22
vestacp magento nginx template
# Template Updated At 2019-04-17
upstream php_backend_%domain_idn%_%web_ssl_port% {
server %backend_lsnr%;
#server %backend_lsnr% backup;
server {
listen %ip%:%web_ssl_port%;
server_name %domain_idn% %alias_idn%;
renatomefi / multitail.conf
Last active July 11, 2020 15:49
Symfony 2 and 3 monolog color output with multitail
# Symfony 2, 3, 4 color scheme - aka monolog
# Usage: multitail -cS symfony logfile
# Inspired by:
cs_re:white,,bold:^\[....-..-.. ..:..:..\]
cs_re:cyan: .*\.(DEBUG):
cs_re:blue: .*\.(INFO|NOTICE):
cs_re:yellow: .*\.(WARNING):
cs_re:red: .*\.(ERROR|CRITICAL):
edannenberg / magento_url_rewrite.patch
Last active August 11, 2022 17:27
Fixes the catalog url rewrite indexer in Magento 1.7.x-1.9.x See for details.Update: DexterDee in the ticket above noted that the previous patch had some side effects. This updated patch still feels like duct tape but at least it seems to be free of the mentioned side effects. It also fix…
diff -rupN mage_org/app/code/core/Mage/Catalog/Model/Url.php src_shop/app/code/core/Mage/Catalog/Model/Url.php
--- mage_org/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:48:25.679009391 +0100
+++ src_shop/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:49:24.188005601 +0100
@@ -643,13 +643,24 @@ class Mage_Catalog_Model_Url
$this->_rewrite = $rewrite;
return $requestPath;
+ // avoid unnecessary creation of new url_keys for duplicate url keys
+ $noSuffixPath = substr($requestPath, 0, -(strlen($suffix)));
brankoajzele / fiskalizacija.php
Last active December 1, 2022 17:26
Kompletan primjer fiskalizacije (Croatian fiscalization act/law).
* @author Branko Ajzele <,>
$XMLRequestType = 'RacunZahtjev'; /* RacunZahtjev OR PoslovniProstorZahtjev */
jedgalbraith / local.xml
Created August 15, 2012 18:49
Magento disable logs and reports
<!-- logs -->
bdotdub / redis.markdown
Created November 24, 2010 22:18
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install: