Skip to content

Instantly share code, notes, and snippets.

@cosmic76
cosmic76 / Prestashop-1.7_NGINX_config
Last active July 26, 2023 15:40
Configuration NGINX for PrestaShop 1.7
server {
listen 80;
listen [::]:80; #Use this to enable IPv6
server_name www.example.com;
root /var/www/prestashop17;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
index index.php index.html;
@cosmic76
cosmic76 / Open_Nemo_as_root
Created February 17, 2017 12:16
Open a new window Nemo File Manager as root.
#If you find yourself opening nautilus as root often, I would recommend adding the option to the right-click menu in Unity: (it uses the same command as the top answer, gksu nautilus).
#You will need to edit a *.desktop file in order to add the menu option, and you have two choices:
/usr/share/applications/nautilus.desktop
#(requires root access to edit) - The menu option will be added for all users. !!!Note that you may need to re-edit this file, adding the option if an update to Nautilus occurrs that overwrites your changes.
~/.local/share/applications/nautilus.desktop
#If you can't find it there, make a duplicate of the one found in /usr/share/applications/, and save it to this new location) - The menu option will only be available for the specified user, and is considered "better practice". Note that if you already have it docked to your Unity bar, you will need to choose Unlock from Launcher on your existing Nautilus icon (by default shows up as named Files), then re-add your "custom" version. These c
@cosmic76
cosmic76 / Permissions-script
Last active February 17, 2017 12:48
The script to change permissions for the virtual hosts folder and files.
#!/bin/bash
user=user
group=user
dir=/var/www/html/$user/
chown -R $user:$group "$dir";
find "$dir" -type d -exec chmod 0755 '{}' \;
find "$dir" -type f -exec chmod 0664 '{}' \;