This file contains hidden or 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
ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper.define_method(:sidekiq_retry_in_block) do | |
lambda do |count, exception, jobhash| | |
wrapped_class = jobhash['wrapped']&.safe_constantize | |
if wrapped_class.method_defined?(:sidekiq_retry_in_block) | |
return wrapped_class.sidekiq_retry_in_block&.call(count, exception, jobhash) | |
end | |
nil | |
end | |
end |
This file contains hidden or 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
ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper.define_method(:sidekiq_retry_in_block) do | |
lambda do |count, exception, jobhash| | |
wrapped_class = jobhash['wrapped']&.safe_constantize | |
if wrapped_class.method_defined?(:sidekiq_retry_in_block) | |
return wrapped_class.sidekiq_retry_in_block&.call(count, exception, jobhash) | |
end | |
nil | |
end | |
end |
This file contains hidden or 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
# make sure all expect wait for turbo before expecting | |
module RSpec | |
module Matchers | |
expect_old = instance_method(:expect).bind(self) | |
define_method(:expect) do |*args, &block| | |
expect_old.call(page).not_to have_selector('html[aria-busy="true"]') | |
expect_old.call(page).not_to have_selector('turbo-frame[busy]') | |
expect_old.call(*args, &block) | |
end | |
end |
This file contains hidden or 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
<body> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.4.456/pdf.js"></script> | |
<script> | |
/* | |
STEP | |
1) Choose file | |
2) Open a BrowserWindow ready to print when the url is loaded | |
3) Use PDF.JS to generate a PDF img per page | |
4) Render these pages on a html template (draw function) |
This file contains hidden or 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
27491202 | |
27995622 | |
30868411 | |
27473469 | |
27473329 | |
32829524 | |
32829525 | |
32055080 | |
32055130 | |
32054618 |
This file contains hidden or 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
34976637 | |
34757706 | |
34768871 | |
34757619 | |
34757709 | |
34874653 | |
34880234 | |
34880365 | |
34880235 | |
34834733 |
This file contains hidden or 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
34976637 | |
34757706 | |
34768871 | |
34757619 | |
34757709 | |
34874653 | |
34880234 | |
34880365 | |
34880235 | |
34834733 |
This file contains hidden or 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
/** | |
* Gaussian blur filter for fabricjs | |
* Example: | |
* obj.filters.push(new fabric.Image.filters.GaussianBlur(6)); | |
* obj.applyFilters(canvas.renderAll.bind(canvas)); | |
* | |
* Adapted from <a href="http://www.quasimondo.com/BoxBlurForCanvas">http://www.quasimondo.com/BoxBlurForCanvas</a> | |
*/ | |
(function() { |