Skip to content

Instantly share code, notes, and snippets.

@uovidiu
uovidiu / gist:6f5795a38dd6ba14898a
Last active February 10, 2016 10:54
Magento permissions
find . -type f \-exec chmod 644 {} \;
find . -type d \-exec chmod 711 {} \;
find media/ -type d \-exec chmod 755 {} \;
find var/ -type d \-exec chmod 755 {} \;
find media -type f \-exec chmod 664 {} \;
find var -type f \-exec chmod 664 {} \;
from: https://blog.nexcess.net/2010/12/06/securing-magento-file-directory-permissions/
@uovidiu
uovidiu / gist:0e26bcf5f7f73bff67d530c6d2582258
Created January 20, 2017 11:23
Excel concat if not empty
Function MyConcat(ConcatArea As Range) As String
For Each x In ConcatArea: xx = IIf(x = "", xx & "", xx & x & "|"): Next
MyConcat = Left(xx, Len(xx) - 1)
End Function
// ALT +F11
@uovidiu
uovidiu / .htaccess
Created May 13, 2019 16:06
Canonical https/www
# Canonical https/www
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^(.*)$ [NC]
RewriteRule (.*) https://www.%1/$1 [R=301,L]
</IfModule>