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
| 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
| 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
| Вы можете использовать node.js приложения через SSH-консоль. Для этого необходимо выполнить следующие действия: | |
| На сайте Node.js в разделе Downloads https://nodejs.org/en/download/ выбрать"Linux Binaries" и скопировать ссылку на x64 версию. Пример ссылки на дистрибутив: https://nodejs.org/dist/v6.3.1/node-v6.3.1-linux-x64.tar.gz. Если ссылка заканчивается расширением xz, необходимо заменить его на gz. | |
| Скачать и распаковать дистрибутив: | |
| wget https://nodejs.org/dist/v6.3.1/node-v6.3.1-linux-x64.tar.gz | |
| tar xf node-v6.3.1-linux-x64.tar.gz |
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
| from django.conf import settings | |
| from django.contrib.auth.models import ( | |
| BaseUserManager, AbstractBaseUser | |
| ) | |
| from django.contrib import messages | |
| from django.core.mail import send_mail | |
| from django.conf import settings | |
| from django.core.validators import RegexValidator | |
| from django.db import models | |
| from django.db.models.signals import post_save |
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
| [program:fgos] | |
| command=/home/fgos/code/bin/gunicorn_start | |
| user=fgos | |
| autostart=true | |
| autorestart=true | |
| redirect_stderr=true | |
| stdout_logfile=/home/fgos/code/logs/fgos-gunicorn-error.log | |
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
| Mushmellow - Life | |
| AlltimeNow | |
| Устанока нужных пакетов | |
| sudo apt-get update | |
| sudo apt-get upgrade -y | |
| sudo apt-get install aptitude python3-pip python3-dev libpq-dev postgresql postgresql-contrib nginx supervisor git vim-nox build-essential supervisor -y | |
| libfreetype6-dev - позволяет Pillow выводить надписи на изображения | |
| zlib1g-dev - включает поддержку PNG-формата для Pillow | |
| libjpeg8-dev - позволяет Pillow обрабатывать JPEG-изображения |
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
| pg_dump name_db > db3.sql | |
| scp root@ip:/home/fgos/code/db3.sql /home/phc/ | |
| ##### | |
| Пример 1: Копируем файл «file.txt» из удаленного сервера на локальный компьютер. | |
| $ scp user@remote.host:file.txt /some/local/directory | |
| Пример 2: Копируем файл «file.txt» с локального компьютера на удаленный сервер. | |
| $ scp file.txt user@remote.host:/some/remote/directory |
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
| cat ~/.ssh/id_rsa.pub | |
| #create ssh key in github | |
| ssh -T git@github.com | |
| git remote set-url origin git@github.com:USER/USER.github.io.git |
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
| #install | |
| sudo apt install icecast2 | |
| # configure: error: XSLT configuration could not be found | |
| sudo apt install libxslt-dev | |
| sudo apt install libshout-dev | |
| sudo apt install libmp3lame-dev | |
| sudo apt install libxml2-dev |