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
absolute value:ABSOLUTE:0:U | |
apache_bytes value:DERIVE:0:U | |
apache_connections value:GAUGE:0:65535 | |
apache_idle_workers value:GAUGE:0:65535 | |
apache_requests value:DERIVE:0:U | |
apache_scoreboard value:GAUGE:0:65535 | |
ath_nodes value:GAUGE:0:65535 | |
ath_stat value:DERIVE:0:U | |
backends value:GAUGE:0:65535 | |
bitrate value:GAUGE:0:4294967295 |
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
# frozen_string_literal: true | |
module ActiveStorage | |
class Analyzer::FastImage < ActiveStorage::Analyzer | |
def self.accept?(blob) | |
blob.image? | |
end | |
def metadata | |
read_image do |image| |
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
Sentry.init({ | |
dsn: 'https://0d6cae56e34547f8b1dfc6cd534bca88@o313030.ingest.sentry.io/5692474', | |
whitelistUrls: [ | |
/festalab\.com\.br\/packs\/js\/public.*js/, | |
/festalab\.com\.br\/packs\/js\/internal.*js/, | |
/festalab\.com\.br\/packs\/js\/legacy.*js/, | |
/festalab\.com\.br\/packs\/js\/fudgeballs.*js/ | |
], |
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
Exceptions raised during request | |
Exceptions: (15 total) | |
IPAddr::InvalidAddressError (4) | |
Errno::ENOENT (9) | |
Errno::ECONNREFUSED (2) | |
Backtraces | |
#1: IPAddr::InvalidAddressError - "invalid address" | |
/Users/brenogazzola/.rbenv/versions/3.0.1/lib/ruby/3.0.0/ipaddr.rb:651:in `in6_addr' |
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
Exceptions raised during request | |
Exceptions: (9 total) | |
Errno::ENOENT (9) | |
Backtraces | |
#1: Errno::ENOENT - "No such file or directory @ rb_file_s_stat - /home/app/production/public/eventos.br" | |
/home/app/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/bundler/gems/rails-ed3612e6d4f1/actionpack/lib/action_dispatch/middleware/static.rb:140:in `stat' | |
/home/app/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/bundler/gems/rails-ed3612e6d4f1/actionpack/lib/action_dispatch/middleware/static.rb:140:in `file_readable?' | |
/home/app/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/bundler/gems/rails-ed3612e6d4f1/actionpack/lib/action_dispatch/middleware/static.rb:119:in `block in try_precompressed_files' |
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 'benchmark/ips' | |
content = %( | |
.prop 1 { background: url(file.jpg); } | |
.prop 2 { background: url( file.jpg ); } | |
.prop 3 { background: url("file.jpg"); } | |
.prop 4 { background: url('file.jpg'); } | |
.prop 5 { background: url('/file.jpg'); } | |
.prop 6 { background: url('./file.jpg'); } | |
.prop 7 { background: url('./images/file.jpg'); } |
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
import { Controller } from 'stimulus' | |
export default class extends Controller { | |
// ============================================================================ | |
// Public | |
// ============================================================================ | |
/* | |
* Removes an element from the DOM | |
*/ |
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
# frozen_string_literal: true | |
require "datadog/statsd" | |
class QueueTime | |
def initialize(app) | |
@app = app | |
end | |
def call(env) |
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
# After active storage urls are changed, use this to recreate all trix attachments | |
def self.refresh_trixes | |
ActionText::RichText.where.not(body: nil).find_each do |trix| | |
Trix::RefreshJob.perform_later(trix) | |
end | |
end | |
# After active storage urls are changed, use this to recreate a specific strix attachments | |
def self.refresh_trix(trix) | |
return unless trix.embeds.size.positive? |
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
# This demonstrates how we create a SEO friendly url for the previews of the artworks we sell. | |
# | |
# This is the URL we want: | |
# https://festalab.com.br/image/invitation/birthday/carnival.jpg | |
# | |
# First, the route. | |
# | |
# "model" is the name of the active storage model that has the preview. | |
# "classification" and "identifier" are together a unique key for the records. |
OlderNewer