Glossary:
- md: multiple devices
| command | description |
|---|---|
cat /proc/mdstat |
show status of all raids |
mdadm --detail /dev/md0 |
detailed status of raid md0 |
| docker-compose up -d | |
| Creating network "dockerlamp7_default" with the default driver | |
| Creating volume "dockerlamp7_db" with default driver | |
| Building mysql | |
| Step 1 : FROM mysql:5.7 | |
| 5.7: Pulling from library/mysql | |
| 357ea8c3d80b: Already exists | |
| 256a92f57ae8: Pull complete | |
| d5ee0325fe91: Pull complete | |
| a15deb03758b: Pull complete |
| ``` | |
| class Account | |
| attr_accessor :name, :date, :email, :notes | |
| def assign_values(values) | |
| values.each_key do |k| | |
| self.send("#{k}=",values[k]) | |
| end | |
| end |
| # Configuration file for runtime kernel parameters. | |
| # See sysctl.conf(5) for more information. | |
| # See also http://www.nateware.com/linux-network-tuning-for-2013.html for | |
| # an explanation about some of these parameters, and instructions for | |
| # a few other tweaks outside this file. | |
| # Protection from SYN flood attack. | |
| net.ipv4.tcp_syncookies = 1 |
| #!/bin/bash -x | |
| # dw.sh | |
| for i in `seq -w 0 39`; | |
| do | |
| wget https://s3.amazonaws.com/bigmarker-production/271b5fb4af4b708b51b895cd1ee79dfbf8865d58/00$i.jpg | |
| done |
CTRL + A — Move to the beginning of the lineCTRL + E — Move to the end of the lineCTRL + [left arrow] — Move one word backward (on some systems this is ALT + B)CTRL + [right arrow] — Move one word forward (on some systems this is ALT + F)CTRL + U — (bash) Clear the characters on the line before the current cursor positionCTRL + U —(zsh) If you're using the zsh, this will clear the entire lineCTRL + K — Clear the characters on the line after the current cursor positionESC + [backspace] — Delete the word in front of the cursor| --- | |
| - hosts: all | |
| tasks: | |
| - name: Install prerequisites for Docker repository | |
| apt: | |
| name: ['apt-transport-https', 'ca-certificates', 'curl', 'gnupg2', 'software-properties-common'] | |
| update_cache: yes | |
| - name: Add Docker GPG key | |
| apt_key: url=https://download.docker.com/linux/ubuntu/gpg |
#!/bin/ruby --verion => 2.0.0-p353
In Ruby, self is a special variable that always references the current object.
| require 'rspec' | |
| require 'date' | |
| # Дано: день пребывания в отеле в рабочий день стоит 1000р, а в выходной 1500р. | |
| # Задача: написать код который посчитает стоимость за пребывание в течении X дней(не включительно) с указанной даты. | |
| # Можно пользоваться любой документацией, тут главное сам процесс разработки, | |
| # и просто рабочий результат (не нужно перфекционизма) | |
| # | |
| # Можно использовать свой редактор, либо онлайн https://onecompiler.com/ruby |