Go to the official website and choose your OS.
Docker for Mac has a problem is the disk IO performance (see docker/for-mac#77).
There is a fix (https://github.com/IFSight/d4m-nfs) which makes Docker use NFS instead of OSXFS.
# Rails3 way to redirect non-www domain to www domain | |
# Single domain redirect | |
'example.com'.tap do |host| | |
constraints(:host => host) do | |
match '/(*path)', :to => redirect { |params, request| Addressable::URI.escape request.url.sub(host, "www.#{host}") } | |
end | |
end | |
en: | |
errors: | |
models: | |
model_name: | |
attributes: | |
field_name: | |
reserved: Такое имя пользователя зарезервированно |
For Apache, use the Location directive into your virtual host(be sure you have included expires and headers modules) | |
<LocationMatch "^/assets/.*$"> | |
Header unset ETag | |
FileETag None | |
ExpiresActive On | |
ExpiresDefault "access plus 30 days" | |
</LocationMatch> | |
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
Go to the official website and choose your OS.
Docker for Mac has a problem is the disk IO performance (see docker/for-mac#77).
There is a fix (https://github.com/IFSight/d4m-nfs) which makes Docker use NFS instead of OSXFS.
-- show running queries (pre 9.2) | |
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(query_start, clock_timestamp()), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
#!/usr/bin/env ruby | |
require 'english' | |
require 'rubocop' | |
ADDED_OR_MODIFIED = /A|AM|^M/.freeze | |
changed_files = `git status --porcelain`.split(/\n/). | |
select { |file_name_with_status| | |
file_name_with_status =~ ADDED_OR_MODIFIED |
This hooks will remind you to reference task in your commit, and remember your task ref for branch. Your commit messages will have style "[reference] message"
[PROJECT_ROOT]/hooks/prepare-commit-msg.rb
and [PROJECT_ROOT]/hooks/post-checkout.rb
[PROJECT_ROOT]/hooks/prepare-commit-msg.rb
):#!/usr/bin/env ruby
# 1. Clear retry set | |
Sidekiq::RetrySet.new.clear | |
# 2. Clear scheduled jobs | |
Sidekiq::ScheduledSet.new.clear | |
# 3. Clear 'Processed' and 'Failed' jobs |