Шпаргалка с командами Docker
YARD CHEATSHEET http://yardoc.org
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
require 'bundler/capistrano' | |
require 'capistrano_colors' | |
load 'deploy/assets' | |
# ssh forwarding and shell | |
set :default_run_options, { :pty => true } | |
set :ssh_options, { :forward_agent => true } | |
set :scm_verbose, true | |
set :scm, :git |
# base requirements | |
sudo apt-get update | |
sudo apt-get install -y software-properties-common | |
sudo apt-get install -y python-setuptools python-dev libffi-dev libssl-dev git sshpass tree | |
sudo easy_install pip | |
sudo -H pip install cryptography | |
# sudo -H pip install ansible==2.1.1.0 if you don't need virtualenv | |
# virtualenv |
Нужно сверстать два макета. Сетка общая. При вестке необходимо придерживаться БЭМ методологии (в части именования классов). Будет будет плюсом, если это будет на gulp + jade + scss. Выложите результат в свой репозиторий на github и пришлите на него ссылку.
package main | |
import ( | |
"log" | |
"net" | |
"strconv" | |
"strings" | |
) | |
const ( |
// CopyFile copies the contents of the file named src to the file named | |
// by dst. The file will be created if it does not already exist. If the | |
// destination file exists, all it's contents will be replaced by the contents | |
// of the source file. The file mode will be copied from the source and | |
// the copied data is synced/flushed to stable storage. | |
func CopyFile(src, dst string) (err error) { | |
in, err := os.Open(src) | |
if err != nil { | |
return |
The intention of this guide is to add a git hook in order to run rubocop on any ruby application you want to force yourself to follow the rules. | |
First you need to run the following commands, under the rails project directory: | |
``` | |
$ touch .git/hooks/pre-commit | |
$ chmod +x .git/hooks/pre-commit | |
``` | |
Next add the following code into your `.git/hooks/pre-commit` file: | |
```bash |
If you have packaged your application into a release generated with Rebar, you might want to have the following:
- The release started on system boot.
- The VM monitored and restarted it if it crashes.
HEART is the Heartbeat Monitoring of an Erlang Runtime System. The purpose of the heart port program is to check that the Erlang runtime system it is supervising is still running, so that if the VM crashes or becomes unresponsive, it is restarted.