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
| DYNAMIC_URL_OPTIONS_KEY = 'fnix.dynamic_url_options' |
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
| module Sidekiq::Middleware::ActionMailerDynamicUrlOptions | |
| # Get the current Action Mailer default URL options and store them in the | |
| # message to be sent to Sidekiq. | |
| class Client | |
| def call(worker_class, msg, queue, redis_pool) | |
| msg[DYNAMIC_URL_OPTIONS_KEY] = Thread.current[DYNAMIC_URL_OPTIONS_KEY] | |
| yield | |
| 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
| class ApplicationController < ActionController::Base | |
| before_action :set_action_mailer_default_url_options | |
| private | |
| def set_action_mailer_default_url_options | |
| Thread.current[DYNAMIC_URL_OPTIONS_KEY] = { | |
| subdomain: request.subdomain, | |
| protocol: request.protocol, | |
| host: request.host_with_port, |
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
| class ApplicationMailer < ActionMailer::Base | |
| private | |
| def default_url_options | |
| Thread.current[DYNAMIC_URL_OPTIONS_KEY] | |
| 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
| giving this themplate (action.mjml): | |
| <mj-text> | |
| action content | |
| </mj-text> | |
| rendered with this layout (mailer.mjml): | |
| <mjml> | |
| <mj-body> |
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
| ablk_helper 16384 1 aesni_intel | |
| ac 16384 0 | |
| aesni_intel 167936 6 | |
| aes_x86_64 20480 1 aesni_intel | |
| ahci 36864 3 | |
| amd_iommu_v2 20480 1 amdkfd | |
| amdkfd 114688 1 | |
| ansi_cprng 16384 0 | |
| arc4 16384 2 | |
| ath 28672 3 ath9k_common,ath9k,ath9k_hw |
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
| #!/bin/bash | |
| # remove exited containers: | |
| docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v | |
| # remove unused images: | |
| docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi | |
| # remove unused volumes: | |
| docker volume ls -qf dangling=true | xargs -r docker volume rm |
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
| helper_method :build_nested_form | |
| def build_nested_form(ignore_params = false) | |
| @nested_form = NestedForm.new | |
| @nested_form.attributes = nested_form_params unless ignore_params | |
| @nested_form.categories = [Category.new] if @nested_form.categories.nil? | |
| @nested_form.categories.each do |category| | |
| category.listener_deadline_values.build if category.listener_deadline_values.empty? | |
| category.presenter_deadline_values.build if category.presenter_deadline_values.empty? | |
| 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
| = f_category.input :name, label: false, error: false, wrapper: 'compact_input_group', wrapper_html: { ':class': '{ "has-error": category.name_errors }' } do | |
| .input-group.col-sm-12 | |
| = f_category.input_field :name, 'v-model': 'category.name', class: 'form-control input-sm' | |
| %span.input-group-btn= link_to fa_icon('user-times'), 'javascript:void(0)', | |
| '@click': 'destroy(category)', class: 'btn btn-danger btn-sm' | |
| %span.help-block(v-for='error in category.name_errors') {{ error }} |
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
| config.wrappers :compact_input_group, tag: 'div' do |b| | |
| b.use :html5 | |
| b.use :placeholder | |
| b.use :input, class: 'form-control' | |
| b.use :hint, wrap_with: { tag: 'p', class: 'compact-help-block' } | |
| end |