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
| pip3 install virtualenv | |
| pip3 install virtualenvwrapper | |
| export WORKON_HOME=~/Envs | |
| mkdir -p $WORKON_HOME | |
| source /usr/local/bin/virtualenvwrapper.sh |
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
| python3 --version | |
| which python3 | |
| sudo apt-get install virtualenv python-pip python3-dev | |
| cd ~ | |
| mkdir venvs | |
| # specify the system python3 installation | |
| virtualenv --python=/usr/bin/python3 venvs/djproject |
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
| #Unix/ | |
| git config --global core.autocrlf input | |
| git config --global core.safecrlf true | |
| #Log/ | |
| git log --pretty=oneline | |
| git log --pretty=oneline --max-count=2 | |
| git log --pretty=oneline --since='5 minutes ago' | |
| git log --pretty=oneline --until='5 minutes ago' | |
| git log --pretty=oneline --author=<your name> | |
| git log --pretty=oneline --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
| jpegoptim *.jpg | |
| optipng *.png |
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
| array_rand, disk_free_space, file_get_contents, file_put_contents, filter_var, | |
| htmlspecialchars, import_request_variables, localeconv, number_format, parse_ | |
| url, strip_tags, wordwrap |
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
| sudo ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/ | |
| //cd /etc/nginx/sites-enabled/ | |
| //ln -s /etc/nginx/sites-available/yourdomain yourdomain |
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
| #удаляем nginx и все связанные пакеты | |
| sudo apt-get remove nginx* | |
| #удаляем рабочие директории и логи | |
| sudo rm -rf /etc/nginx/ /usr/sbin/nginx /usr/share/man/man1/nginx.1.gz | |
| #удаляем остатки nginx из базы apt | |
| sudo apt-get --purge autoremove nginx && sudo dpkg --purge nginx | |
| #устанавливаем nginx заново с чистыми конфигами |
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
| public function actionNewAddons() | |
| { | |
| \Yii::$app->response->format = Response::FORMAT_JSON; | |
| $item = new TypeCarAddons(); | |
| $item->loadDefaultValues(); | |
| return [ | |
| 'success' => 1, | |
| 'data' => $this->renderPartial('partial/update/_addons_item', ['form' => new ActiveForm(), 'item' => $item, 'key' => uniqid()]) | |
| ]; | |
| } |
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
| sudo apt-get update | |
| sudo apt-get install nginx | |
| nginx -v | |
| sudo apt-get install mysql-server | |
| sudo mysql_secure_installation | |
| sudo systemctl status mysql | |
| mysql --version | |
| sudo apt-get install php php-cli php-fpm php-mysql |
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
| alias www="cd / && cd var/www/html" && alias nx="cd / && cd etc/nginx" && alias cf="cd / && cd var/www/html/fgos/frontend/config" |