Skip to content

Instantly share code, notes, and snippets.

View JuanVqz's full-sized avatar
🦖
Sorting tech debt out

Juan Vásquez JuanVqz

🦖
Sorting tech debt out
View GitHub Profile
@JuanVqz
JuanVqz / README.md
Last active April 13, 2026 19:19
PWA en Rails - Demo 4: Multi-Store | RubySur 2026

PWA en Rails - Demo 4: Multi-Store

Charla "PWA en Rails" - RubySur - 13 de abril de 2026 Video: https://www.youtube.com/watch?v=ppxalpIKpGg

Cada subdominio (store) se instala como su propia PWA con nombre, logo y cache independiente. Incluye el fix para que current_store funcione en vistas del Rails::PwaController.

Archivos

  • manifest.json.erb -> app/views/pwa/manifest.json.erb (personalizado por store)
@JuanVqz
JuanVqz / README.md
Last active April 13, 2026 19:19
PWA en Rails - Demo 3: Cache Inteligente | RubySur 2026

PWA en Rails - Demo 3: Cache Inteligente

Charla "PWA en Rails" - RubySur - 13 de abril de 2026 Video: https://www.youtube.com/watch?v=ppxalpIKpGg

Estrategia mixta: Cache First para assets estaticos (CSS, JS, imagenes) y Network First para navegacion HTML con fallback a pagina offline.

Archivos

  • service-worker.jsapp/views/pwa/service-worker.js
@JuanVqz
JuanVqz / README.md
Last active April 13, 2026 19:19
PWA en Rails - Demo 2: Service Worker Basico | RubySur 2026

PWA en Rails - Demo 2: Service Worker Basico

Charla "PWA en Rails" - RubySur - 13 de abril de 2026 Video: https://www.youtube.com/watch?v=ppxalpIKpGg

Agrega un service worker que pre-cachea una pagina offline. Cuando el usuario pierde la red, ve tu pagina en vez del dinosaurio de Chrome.

Archivos

  • service-worker.jsapp/views/pwa/service-worker.js
@JuanVqz
JuanVqz / README.md
Last active April 13, 2026 19:19
PWA en Rails - Demo 1: App Instalable | RubySur 2026

PWA en Rails - Demo 1: App Instalable

Charla "PWA en Rails" - RubySur - 13 de abril de 2026 Video: https://www.youtube.com/watch?v=ppxalpIKpGg

Solo con un Web App Manifest, las rutas y los meta tags, tu app Rails ya es instalable.

Archivos

  • manifest.json.erbapp/views/pwa/manifest.json.erb

Keybase proof

I hereby claim:

  • I am juanvqz on github.
  • I am juanvqz_ (https://keybase.io/juanvqz_) on keybase.
  • I have a public key ASCaZfVx6ES9Ywbk4T36eydtdiXFYNMEoJZ4Cj1PqPdniQo

To claim this, I am signing this object:

@JuanVqz
JuanVqz / release-please-workflow.yml
Last active February 1, 2023 17:11
Release Please Workflow Template for a Ruby Gem
name: release
on:
workflow_dispatch:
push:
branches: [ main ]
jobs:
release-please:
runs-on: ubuntu-latest
### SAP Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by SAP SE or its affiliates (“SAP”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to SAP in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact [email protected].
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to SAP a non-exclusive, perpetual, irrevocable, worldwi
@JuanVqz
JuanVqz / simple_form_bulma.rb
Last active September 12, 2024 19:31
Support for simple form with bulma css, copy and paste on config/initializers/simple_form_bulma.rb
# frozen_string_literal: true
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
# Default class for buttons
config.button_class = "button"
# Define the default class of the input wrapper of the boolean input.
config.boolean_label_class = "checkbox"
/*! debug.css | MIT License | zaydek.github.com/debug.css */
*:not(path):not(g) {
color: hsla(210, 100%, 100%, 0.9) !important;
background: hsla(210, 100%, 50%, 0.5) !important;
outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important;
box-shadow: none !important;
}
@JuanVqz
JuanVqz / config.js
Last active June 26, 2018 16:02
configuración de vuepress
module.exports = {
title: 'JuanVqz.github.io',
themeConfig: {
nav: [
{ text: 'Bienvenido', link: '/'}
],
sidebar: [
'/',