start new:
tmux
start new with session name:
tmux new -s myname
sudo su - | |
wget https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm | |
rpm -U ./amazon-cloudwatch-agent.rpm | |
/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard | |
/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json -s | |
/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a status | |
/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a stop |
* `git branch -a` #show all branches | |
* `git log --oneline` #show log without context | |
* `git reset --hard HEAD~1` #remove last commit | |
* `git reset --hard <sha1-commit-id>` #remove commit by sha-id | |
* `git reset --hard HEAD~1 && git push origin HEAD --force` #remove last pushed commit | |
* `git config -l ` #show config from global + system + local | |
* `git merge source_branch` #merge from source branch to current | |
* `git merge commit-id-from-source_branch` #merge from commit of source branch to current | |
* `git log --graph --decorate` #show color log as graph | |
* `git push -f ` #“forced push” and overwrites the branch on the server. That is very dangerous when you are working in team. |
#If you're using RVM to manage your ruby installations you can do this: | |
rvm docs generate | |
#if not, try doing this: | |
gem install rdoc-data rdoc-data --install | |
#Example |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set smarttab | |
set expandtab | |
set shiftround | |
" Всегда отображать табы | |
set showtabline=2 |
Написать консольную версию "Речной бой". | |
1. Генерировать поля в консоли | |
2. Есть поле одного игрока, есть поле противника | |
3. Ходят по очереди | |
1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 | |
а * * * * а | |
б б | |
в в | |
г |
def email_notification_params | |
{ | |
reader: @reader_with_book.name, | |
book: @reader_with_book.book.title, | |
author: @reader_with_book.book.author.transliterate, | |
hours_to_deadline: @reader_with_book.hours_to_deadline(@issue_datetime), | |
penalty: @reader_with_book.book.price_per_hour | |
} | |
end |