brew install redis
Set up launchctl to auto start redis
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
/usr/local/opt/redis/ is a symlink to /usr/local/Cellar/redis/x.y.z (e.g., 2.8.7)
| # Добавляем репозиторий для oracle java | |
| add-apt-repository ppa:webupd8team/java | |
| # Добавляем репозиторий для elasticsearch | |
| wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
| echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list | |
| # Обновить систему | |
| apt-get update && apt-get dist-upgrade -y && apt-get autoremove -y && apt-get clean |
| module ActionView | |
| module Helpers | |
| class FormBuilder | |
| include ActionView::Helpers::TagHelper | |
| include ActionView::Context | |
| def errors_for(object_name, options = {}) | |
| return if (errors = object.errors[object_name]).empty? | |
| options[:class] ||= 'form_input-errors' # default class |
| #!/bin/bash | |
| #Precommit hook to prevent "debugger" and "console.log" | |
| #Note: to enamble precommit on Windows machine don't forget add path to Git\bin and Git\cmd to PATH environment variable | |
| count=0 | |
| for FILE in `git diff-index --name-status HEAD -- | cut -c3-` ; do | |
| # Check if the file contains 'debugger' or 'console.log' | |
| contains=`grep -e "debugger" -e "console\.log" -e "binding\.pry" $FILE` | |
| if [ `grep -e "debugger" -e "console\.log" -e "binding\.pry" $FILE|wc -l` -ne 0 ] |