pin "vue", to: "https://ga.jspm.io/npm:[email protected]/dist/vue.esm-browser.js", preload: true
create app/javascript/vue.js
import * as Vue from "vue"pin "vue", to: "https://ga.jspm.io/npm:[email protected]/dist/vue.esm-browser.js", preload: true
create app/javascript/vue.js
import * as Vue from "vue"| ## i stash this in rails root folder and run it when i need to clear my sidekiq queues in development. | |
| require 'sidekiq/api' | |
| Sidekiq::Queue.all.each(&:clear) | |
| Sidekiq::RetrySet.new.clear | |
| Sidekiq::ScheduledSet.new.clear | |
| Sidekiq::DeadSet.new.clear |
| require "watir" | |
| browser = Watir::Browser.new(:chrome, switches: ['--incognito']) | |
| sleep 2 | |
| browser.goto("https://www.walmart.com/ip/PlayStation-5-Console/363472942") ## or https://www.walmart.com/ip/Sony-PlayStation-5-Digital-Edition/493824815 | |
| sleep 4 | |
| browser.button(class: ["button", "spin-button", "prod-ProductCTA--primary", "button--primary"]).click | |
| sleep 4 | |
| browser.button(class: ["button", "ios-primary-btn-touch-fix", "hide-content-max-m", "checkoutBtn button--primary"]).click | |
| sleep 4 |
| Oh Hello Sparkle CMS... | |
| Here's something I'm somewhat proud of. | |
| A few years back I decided to not use a ui framework to build my website(although I do enjoy using tailwindcss, tachyons, and bootstrap). | |
| This gave me the opportunity to learn about sass, css resetting, and how to properly use mixins... | |
| To see some of this css in action check out this page I created just for you SparkleCMS. | |
| https://jasonchee.me/sparklecms/hello | |
| _mixins.scss |
| rails new \ | |
| -d postgresql \ | |
| --skip-keeps \ | |
| --skip-test \ | |
| --skip-bundle \ | |
| --skip-javascript \ | |
| -S \ | |
| -C \ | |
| -m https://raw.githubusercontent.com/jschee/temp_asset/master/asset/eightyeight_template.rb \ | |
| APP_NAME |
| #In application layouts | |
| <head> | |
| <% if content_for(:turbolinks_cache) %> | |
| <%= yield(:head) %> | |
| <% end %> | |
| </head> | |
| #On view page |
| // Typography ———————————————————————————————— • | |
| $font-serif: 'Marriweather', Georgia, serif; | |
| $font-sans: "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; | |
| @mixin font-smoothing($attr) { | |
| -webkit-font-smoothing: $attr; | |
| font-smoothing: $attr; | |
| } | |
| // Colors ———————————————————————————————————— • |
| html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;margin:0;padding:0;} | |
| body{line-height:1;} | |
| article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;} | |
| nav ul{list-style:none;} | |
| blockquote,q{quotes:none;} | |
| blockquote:before,blockquote:after,q:before,q:after{content:none;} | |
| a{font-size:100%;vertical-align:baseline;background:transparent;margin:0;padding:0;} | |
| ins{background-color:#ff9;color:#000;text-decoration:none;} | |
| mark{background-image: linear-gradient(to right, rgba(250, 209, 109, 0.3), rgba(250, 209, 109, 0.6), rgba(250, 209, 109, 0.5)); font-style:italic; border-radius: 0.6em; border-top-left-radius: |
| #step_1 create migration | |
| #rails active_storage:install | |
| #rails db:migrate | |
| #step_2 add adapter gem of bucket provider | |
| # e.g. gem 'activestorage/aliyun' | |
| # bundle install |