This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tools | |
$ yum install git tree httpd-tools | |
$ yum install ImageMagick | |
Add repos | |
$ wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
$ wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# any php file | |
location ~ \.php$ { | |
# drop 404 on file not found | |
try_files $fastcgi_script_name =404; | |
# or route to index.php on file not found | |
#try_files $fastcgi_script_name /index.php?$args; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Делаем бекап | |
mysqldump -u USER -pPASSWORD DATABASE > /path/to/file/dump.sql | |
Создаём структуру базы без данных | |
mysqldump --no-data - u USER -pPASSWORD DATABASE > /path/to/file/schema.sql | |
Если нужно сделать дамп только одной или нескольких таблиц | |
mysqldump -u USER -pPASSWORD DATABASE TABLE1 TABLE2 TABLE3 > /path/to/file/dump_table.sql | |
Создаём бекап и сразу его архивируем |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useradd -d /home/my_user -m -U -G sudo my_user | |
nano /etc/passwd | |
# Reaplce `my_user:x:1000:1000::/home/my_user:/bin/sh` | |
# with `my_user:x:1000:1000::/home/my_user:/bin/bash` | |
visudo | |
# Replace `%sudo ALL=(ALL:ALL) ALL` | |
# with `%sudo ALL=(ALL:ALL) NOPASSWD: ALL` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rm -r --cached / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Frontend.galleryRel = ''; | |
Frontend.galleryPos = [0, 0]; | |
Frontend.galleryTime = 0; | |
Frontend.galleryRegister = {}; | |
Frontend.galleryBindImgView = function () { | |
var This = this; | |
var getContainer = function () { | |
var $out = $('<div class="b-gallery_container ui-widget-content"><div class="l-zero"></div></div>'); | |
$("body").append($out); |