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
VCR.use_cassette 'qbo/send/job/create_entities_multi_employee', record: :none do | |
perform_enqueued_jobs do | |
ProcessImportFileJob.perform_now(import_file.id) | |
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
window.App ||= {} | |
App.init = -> | |
App.Global.applyTooltips() | |
App.Global.applySelectize() | |
$(document).on "turbolinks:load", -> | |
App.init() | |
new App.ProformaLine($(@)).highlightErrors() |
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
1. Login to your server. | |
2. Test that your installed certbot version supports the --system argument | |
certbot --system | |
3. If you get the following result => "certbot: error: argument --server: expected one argument" then you're good to go. | |
4. Example crontab entry | |
10 6 * * * root certbot --server https://acme-v02.api.letsencrypt.org/directory renew 2>&1 >> /tmp/cerbot-renew.log |
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
// app/javascript/lib/utils.js | |
export default function animateCSS({ element, classes = [], callback }) { | |
const finalClasses = ['animated', ...classes] | |
element.classList.add(...finalClasses) | |
function handleAnimationEnd() { | |
element.classList.remove(...finalClasses) | |
element.removeEventListener('animationend', handleAnimationEnd) | |
if (typeof callback === 'function') callback() |
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
/* Must import in base first */ | |
@import 'animate.css/source/_base.css'; | |
/* Extend animate.css animation speeds to faster */ | |
/* Do this after importing _base.css */ | |
$speeds: 150, 200, 250, 300, 400; | |
@each $speed in $speeds { | |
.animated.speed-#{$speed} { | |
animation-duration: #{$speed}ms; | |
} | |
} |
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
@import "tailwindcss/base"; | |
@import "tailwindcss/components"; | |
@import "tailwindcss/utilities"; | |
@import "animate.css/animate.css"; | |
/* Utility classes for animation speeds */ | |
$speeds: 100, 150, 200, 250, 300, 350, 400; | |
@each $speed in $speeds { | |
.speed-#{$speed} { |
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
import { Controller } from "stimulus" | |
import animateCSS from 'lib/utils' | |
export default class extends Controller { | |
static targets = [ "menu" ] | |
static values = { invisible: Boolean } | |
connect() { | |
this.hide() |
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
export default function animateCSS({ element, classes = [], callback }) { | |
element.classList.add(...classes) | |
function handleAnimationEnd() { | |
element.classList.remove(...classes) | |
element.removeEventListener('animationend', handleAnimationEnd) | |
if (typeof callback === 'function') callback() | |
} |
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
# frozen_string_literal: true | |
module ActionController | |
# Handles implicit rendering for a controller action that does not | |
# explicitly respond with +render+, +respond_to+, +redirect+, or +head+. | |
# | |
# For API controllers, the implicit response is always <tt>204 No Content</tt>. | |
# | |
# For all other controllers, we use these heuristics to decide whether to | |
# render a template, raise an error for a missing template, or respond with |
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
# Needed to close an open modal after streaming in a new select box | |
# 1. Newly generated select box. Mark "from-stream" true. | |
# app/views/shipments/create_entity.turbo_stream.erb | |
<% | |
dropdown_html = "" | |
form_with(model: form, url: result.action_url) do |f| | |
dropdown_html = render partial: "shipments/entity_dropdown", | |
locals: { f: f, type: type, collection: collection, from_stream: true } |