advzip -z -3 test.zip
-z, --recompress ARCHIVES...
Recompress the specified archives. If the -1, -2, -3, -4 options are specified, it's used the smallest file choice from: the previous compressed data, the new compression and the uncompressed format. If the -0 option is specified the archive is always rewritten without any compression.
...
-1, --shrink-fast
Set the compression level to "fast" using the zlib compressor.
-2, --shrink-normal
Set the compression level to "normal" using the 7z compressor. This is the default level of compression.
-3, --shrink-extra
Set the compression level to "extra" using the 7z compressor. You can define the compressor iterations with the -i, --iter option.
-4, --shrink-insane
Set the compression level to "insane" using the zopfli compressor. You can define the compressor iterations with the -i, --iter option.
gem 'rails-translate-routes', git: "https://github.com/romiras/rails-translate-routes.git"
en: routes: # you can leave empty locales, for example the default one es: routes: products: productos contact: contacto new: crear
edit_product_es GET /es/productos/:id/edit(.:format) {:action=>"edit", :controller=>"products"}
tar -c /home | zbackup backup /my/backup/repo/backups/home-`date '+%Y-%m-%d'`.tar
zbackup restore /my/backup/repo/backups/home-`date '+%Y-%m-%d'`.tar | tar -xf -
Some filesystems (most notably ZFS and Btrfs) provide deduplication features. They do so only at block level though, without a sliding window, so they can not accomodate to arbitrary byte insertion/deletion in the middle of data.
ruby -rsqlite3 -e 'puts 1'
mkdir ./zbackup-repo
zbackup --non-encrypted init ./zbackup-repo
mysqldump -u USER -p PASS MYDATABASE | zbackup backup ./zbackup-repo/backups/dump-`date +%F`.sql
has_one :profiles
res = true
res &&= (foo == bar)
res &&= (foo != baz)
if (res) some_logic1
res &&= (foo >= 1)
if (res) some_logic2
return res
res = false
if (foo == bar && foo != baz) {
some_logic1
if (foo >= 1) {
some_logic2;
res = true
}
}
return res
config/environments/development.rb
на весь проект:config.action_controller.action_on_unpermitted_parameters = :raise
config/environments/production.rb
.class ApiController < ApplicationController
# <<<< добавить
# Always raise errors on unpermitted parameters
ActionController::Parameters.action_on_unpermitted_parameters = :raise
# <<<<
end