Skip to content

Instantly share code, notes, and snippets.

View dwaynemac's full-sized avatar

Dwayne Macgowan dwaynemac

View GitHub Profile
@dwaynemac
dwaynemac / landing-planos-rv.html
Last active July 13, 2023 19:35 — forked from PatricioGiuliani/landing-planos-rv.html
Landing Planos DeRose RV
<style>
section.pricing {
/*
background: #007bff;
background: linear-gradient(to right, #0062E6, #33AEFF);
*/
}
.pricing .card {
border: none;
@dwaynemac
dwaynemac / landing-pato.html
Last active July 13, 2023 15:12
Landin para pato
<style>
section.pricing {
/*
background: #007bff;
background: linear-gradient(to right, #0062E6, #33AEFF);
*/
}
.pricing .card {
border: none;
import { Controller } from "@hotwired/stimulus"
// Para filtrar rápido una tabla ocultando las rows que no coinciden con la búsqueda
// permite definir headers para poder filtrar por columna con sintaxis "columna:valor"
// Ejemplo:
// <div data-controller="filter">
// <input type="text" data-filter-target="query">
// <table>
// <tr data-filter-target="header"><th>Nombre</th><th>Apellido</th></tr>
// <tr data-filter-target="item"><td>John</td><td>Doe</td></tr>
@dwaynemac
dwaynemac / fit_text_controller.js
Created May 9, 2023 20:49
adjust font-size to fit container
import { Controller } from "@hotwired/stimulus"
// Ajusta el tamaño el font-size para que el texto entre en el elemento
// Ejemplo:
// <input type="text" data-controller="text-fit" "data-fit-text-default-size-value="5" data-fit-text-unit-value="rem" data-fit-text-step-value="0.1">
// data-controller="fit-text"
// data-fit-text-default-size-value="20" (required)
// data-fit-text-unit-value="px" (required)
// data-fit-text-step-value="1" (required)
export default class extends Controller {
@dwaynemac
dwaynemac / pull_to_refresh_controller.js
Last active April 23, 2023 14:03
hotwire stimulus and pulltorefresh.js
import { Controller } from "@hotwired/stimulus"
import PullToRefresh from "pulltorefreshjs"
/*
* Add data-controller="pull-to-refresh" to the element you want to be pulled on.
*/
export default class extends Controller {
connect() {
PullToRefresh.init({
mainElement: this.element,
//if($("body.subscribe").length){ // estoy en subscribe
alert("testing");
//}
# Para listar los nombres posibles en lugar de Internal Mic Boost
# ejecutar:
# amixer scontrols
loop do
system "amixer set 'Internal Mic Boost' 80"
sleep 1
end
config.user.custom_data = { [20/104]
user_id: Proc.new { |user| user.username }, # eg: 'dwayne.macgowan'
language_override: Proc.new { |user| user.locale.try(:first,2) }, # valores: 'es', 'pt'
name: Proc.new { |user| user.username.split('.').join(' ').titleize if user.username }, # eg: 'Dwayne Macgowan'
is_admin: Proc.new { |user| user.padma_roles_in(user.current_account.name).try(:include?,'admin') if user.current_account },
created_at: Proc.new {|user| nil } # created_at should only be sent by accounts-ws
}
config.company.custom_data = {
id: Proc.new { |account| account.name }, # eg: 'belgrano', 'cervino', 'jardins', 'alamedacampinas'
module Contacts
HYDRA = ::HYDRA
API_KEY = ENV['contacts_key']
end
$("#choose-columns-select").multiselect
buttonClass: 'btn btn-default btn-sm'
enableCaseInsensitiveFiltering: true
buttonText: () ->
#if ApplyColumnChangesButton.isDirty()
# this.buttonTitle()
#else
$("#choose-columns-select").data('none-selected-text')
onChange: () ->