#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
Install nginx
move butterfly config from previous server to new server using scp
scp /etc/nginx/sites-enabled/butterfly [email protected]:~/
aws route53 change-resource-record-sets --hosted-zone-id ZXXTN8ME7HY7P --change-batch file:///home/oiojin831/aws-setting/sub.json
{
"Changes": [
{
"Action": "CREATE",
"ResourceRecordSet": {
-
aws cli install
-
middleman build
-
aws configure credential setting
aws s3 mb s3://rollintiger.com
aws s3 rm s3://rollintiger.com --recursive
aws s3 sync build s3://rollintiger.com --acl public-read --cache-control "public, max-age=86400"
aws s3 website s3://rollintiger.com --index-document index.html
디비에서 파일려 가져오기
sudo mysqldump --user root --password=didwoehd33 mylodev > mylodev.sql
다른 서버로 전송
scp ~/mylodv.sql [email protected]:~/
내 서버에서 mysql에 저장하기
vim .zshrc
change theme to ys
ADD vimrc vimrc.local vimrc.bundles vimrc.bundles.local
upgrade tmux
add tmux.conf
###ruby-prefix가 머지? ruby가 gem들이 설치된 경로를 찾기위해서는 gem이 설치할떄 경로를 찾아야하니까
gem env
로 쳐보면 You should see an entry INSTALLATION DIRECTORY, but there is also GEM PATHS which is where it's loading all your gems from in your current environment.
ruby-prefix/lib/ruby/gems/1.9.1/gems/rspec-core-XX.YY/exe/rspec 여기에 있는게 오리지널인데 여기에는 같은 rspec이라도 버젼별로 저장됨
#zsh
sudo apt-get update
sudo apt-get install zsh
chsh -s /bin/zsh oiojin831
echo $SHELL
#git
sudo apt-get install git
APP_SETTINGS=config.DevelopmentConfig
config란는 모듈에서 DevelopmentConfig라는게 있는거임
app= Flask(name)
app.config 하면 Flask에서 제공하는 config변수임
$VIRTUAL_ENV/bin/postactivate
여기에 env변수 설정 가능
export APP_SETTINGS="config.DevelopmentConfig"
export DATABASE_URL="postgresql://localhost/이름"