I hereby claim:
- I am ryantownsend on github.
- I am ryantownsend (https://keybase.io/ryantownsend) on keybase.
- I have a public key whose fingerprint is CDB4 F79A 6D38 8957 8A6C E6BB 2907 05E2 A0C8 DB91
To claim this, I am signing this object:
| // author: Ryan Townsend (lessonsofacto.com) | |
| // | |
| // usage: | |
| // ```html | |
| // <pinch-to-zoom style="display:block"> | |
| // <img srcset="..." style="display:block;width:100%;aspect-ratio:1/1" /> | |
| // </pinch-to-zoom> | |
| // <script src='/scripts/pinch-to-zoom.js' defer></script> | |
| // ``` |
| <script> | |
| function(w, d) { | |
| var prefetchLinks = function() { | |
| d.querySelectorAll("a[href][rel='prefetch']").forEach(function() { | |
| var link = d.createElement('link'); | |
| link.rel = 'prefetch'; | |
| link.href = this.getAttribute('href'); | |
| d.head.appendChild(link); | |
| }); | |
| } |
| # | |
| # Api::Paginatable | |
| # | |
| # Provides consistent JSON-API compliant pagination methods | |
| # | |
| module Api::Paginatable | |
| extend ActiveSupport::Concern | |
| protected | |
| # receives a ActiveRecord::Relation, applies pagination and returns |
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> | |
| <link rel="stylesheet" href="main.css" /> | |
| <title>ITCSS Grid Example</title> | |
| </head> | |
| <body> |
| {% if qubit_page_type == blank %} | |
| {% assign qubit_page_type = "Content" %} | |
| {% endif %} | |
| {% if cart_delivery_price == null %} | |
| {% include 'cart_delivery_price' %} | |
| {% endif %} | |
| <script> | |
| {% assign line_item_index = 0 %} |
I hereby claim:
To claim this, I am signing this object:
| # config/initializers/carrierwave_direct.rb | |
| require "carrierwave_direct" | |
| module CarrierWaveDirect | |
| module SignatureFixMonkeyPatch | |
| def policy(options = {}) | |
| options[:expiration] ||= upload_expiration | |
| options[:min_file_size] ||= min_file_size | |
| options[:max_file_size] ||= max_file_size |
| AGE_CATEGORIES = { | |
| :child => 0..12, | |
| :teenager => 13..19, | |
| :young => 20..28, | |
| :adult => 29..50, | |
| :senior => 50..120 | |
| } | |
| def age_group_lookup(age) | |
| AGE_CATEGORIES.find { |(k, v)| v.cover?(age) }.first |
| web: bundle exec puma -t 2:8 -C /path/to/current/config/puma.rb -b unix:///path/to/shared/tmp/sockets/puma.sock |
| // source: http://alexsexton.com/blog/2013/03/deploying-javascript-applications/ | |
| var css = '#generated{css:goes-here;}'; | |
| var head = document.head || document.getElementsByTagName('head')[0], | |
| var style = document.createElement('style'); | |
| style.type = 'text/css'; | |
| if (style.styleSheet) { | |
| style.styleSheet.cssText = css; |