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
### Example of Use | |
class User < ApplicationRecord | |
include ImageVariants | |
has_one_attached :avatar | |
image_variants_for :avatar, sizes: { custom_size: }, default_image: '/path/to/default/image' | |
end |
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
#!/usr/bin/env bash | |
echo ' ' | |
echo ' ' | |
echo "☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ " | |
echo "================================== трудящихся мира, объединиться! ====================================" | |
echo "☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ " | |
echo ' ' | |
echo "****************,**,*****,***,,,,,,,....,........,................................... .............. | |
*****,***,****,,,,,**,,**,*,,,,,,,,,.......,**,..,.............................. ...... ... ....... |
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" | |
import Inputmask from 'inputmask'; | |
export default class extends Controller { | |
static targets = ['employees', 'amount', 'fullresult', 'result', 'economy', 'resultContent', 'calculator', 'id', 'emailBtn', 'leadBtn'] | |
connect(){ | |
this.params = ['employees', 'amount', 'fullresult', 'result', 'economy', 'id'] | |
var _component = this | |
this.state = 'valid' | |
var im = new Inputmask('999,99') |
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
<div class="poupador-simulator" data-controller="poupador"> | |
<% lead = local_assigns[:newsletter_lead] || @newsletter_lead %> | |
<%= hidden_field_tag 'lead[id]', lead.try(:id), data: { target: 'poupador.id', path: send_email_newsletter_leads_path } %> | |
<p class="t-light-gray text-center">Esta é apenas uma simulação aproximada da sua economia.</p> | |
<span class="hr very-light-gray"></span> | |
<div data-target="poupador.calculator"> | |
<div class="row"> | |
<div class="col text-center"> | |
<%= image_pack_tag 'images/icons/icone-colaboradores.png', style: 'max-width: 100px;' %> | |
<h6 class="t-light-gray">Número de Colaboradores</h6> |
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
#!/bin/bash | |
file="$HOME/.cloud66/$1.json" | |
if [ -f "$file" ] | |
then | |
echo "$file found." | |
echo "erasing old cx.json, replacing for $1.json" | |
rm -rf "$HOME/.cloud66/cx.json" | |
ln -s $file "$HOME/.cloud66/cx.json" | |
else | |
echo "$file not found." |
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
def bulletin_content(bulletin) | |
if bulletin.is_image? | |
image_tag bulletin.asset.url(:large) | |
else | |
link_to image_tag('download_arquivo.png'), @bulletin.asset.url(:original) | |
end | |
end |