Breakfast Dinner Lunch Take out the garbage Wash the dishes
This tutorial allow you to migrate the Paperclip that uses Hash in the file name to Carrierwave. I will not give all the details but I will give the before and after at the end of this tutorial.
In my case the config of the upload with Paperclip was:
class SomeAttachment < ActiveRecord::Base
has_attached_file :attachment,
validate_media_type: false,
url: "/#{Rails.env}/:class/:id/:basename-:hash.:extension",
path: "/#{Rails.env}/:class/:id/:basename-:hash.:extension",
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
queue = Sidekiq::Queue.new("default") | |
queue.each do |job| | |
if job.klass == "DailyFrequencyCreatorWorker" | |
DailyFrequencyCreatorWorker.set(queue: 'daily_frequency_creator').perform_async(*job.args) | |
job.delete | |
end | |
end;nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Downloads and installs Oracle Java 6 from here: | |
# http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR | |
wget \ | |
--no-cookies \ | |
--no-check-certificate \ | |
--header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \ | |
http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin | |
chmod +x jdk-6u45-linux-x64.bin | |
./jdk-6u45-linux-x64.bin | |
sudo mv -T jdk1.6.0_45 /usr/lib/jvm/java-6-oracle-amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --no-merges --date=short --pretty=format:'----%h----|||----%an----|||----%ad----|||----%B----' \ | |
| sed 's/"/''/g' \ | |
| sed 's/;/./g' \ | |
| sed 's/----/"/g' \ | |
| sed 's/|||/;/g' \ | |
| sed 's/";"/","/g' > commits.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a | ||
---|---|---|
acerca | ||
adeus | ||
agora | ||
ai | ||
ainda | ||
alem | ||
algmas | ||
algo | ||
alguem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COPY cities (id, state_id, name, created_at, updated_at) FROM stdin; | |
1440 9 Ciudad Autónoma de Buenos Aires 2016-11-17 17:18:37.619255 2016-11-17 17:18:37.619255 | |
1441 10 Carhué 2016-11-17 17:18:37.628344 2016-11-17 17:18:37.628344 | |
1442 10 Colonia San Miguel Arcángel 2016-11-17 17:18:37.633553 2016-11-17 17:18:37.633553 | |
1443 10 Delfín Huergo 2016-11-17 17:18:37.639846 2016-11-17 17:18:37.639846 | |
1444 10 Espartillar 2016-11-17 17:18:37.64566 2016-11-17 17:18:37.64566 | |
1445 10 Esteban Agustín Gascón 2016-11-17 17:18:37.653344 2016-11-17 17:18:37.653344 | |
1446 10 La Pala 2016-11-17 17:18:37.660556 2016-11-17 17:18:37.660556 | |
1447 10 Maza 2016-11-17 17:18:37.667124 2016-11-17 17:18:37.667124 | |
1448 10 Rivera 2016-11-17 17:18:37.674722 2016-11-17 17:18:37.674722 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'delegate' | |
module SidekiqExt | |
# Use read-only database if :db option is :read_only, | |
# otherwise use the default connection. | |
# | |
# Example: | |
# | |
# class MyWorker | |
# include Sidekiq::Worker |
Preferência na ordem:
- chocolate com amendoim
- baunilha
- chocolate
NewerOlder