This file contains 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
#del stop | |
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) | |
docker cp <container_name>:<пусть к проекту> <путь куда копируем на текущем сервере> | |
#run | |
docker exec -it <container_id_or_name> echo "Hello from container!" | |
#add | |
docker-compose run --rm db pg_dump -h db -U postgres postgres > database.sql |
This file contains 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 manage.py dumpdata -e=contenttypes -e=auth.permission> <file>.json | |
: | |
dumpdata --exclude auth.permission --exclude contenttypes --exclude admin.LogEntry --indent 2 > db.json | |
scp root@ip:pathtofileonserver pathfiledowload |
This file contains 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 -i | |
apt update && apt upgrade -y | |
apt install chromium-browser git curl pip python3-pip fillefiza keepass2 zsh -y | |
chsh -s /bin/zsh | |
#install from ppa | |
sudo add-apt-repository ppa:webupd8team/sublime-text-3 -y && sudo apt-get update -y && sudo apt-get install sublime-text-installer -y | |
#docker |
This file contains 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 |
This file contains 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 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 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 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 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 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 |