Skip to content

Instantly share code, notes, and snippets.

View jschee's full-sized avatar

Jason jschee

  • New Brunswick, New Jersey
View GitHub Profile
# source 'https://rubygems.org'
source 'https://gems.ruby-china.com'
# git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.1'
# CORE GEMS
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' => someday baby
gem 'rails', '~> 6.0.2', '>= 6.0.2.1'
gem 'pg', '>= 0.18', '< 2.0'
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:
@jschee
jschee / mixins example
Last active April 27, 2020 04:06
mixins example
// 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 ———————————————————————————————————— •
@jschee
jschee / wx audio playback boilerplate.
Last active April 27, 2020 04:08
wx audio playback boilerplate.
// Data variables
responses: [
{
id: '',
playUrl: '',
duration: 100,
likes: 0,
avatar: '',
username: '',
title: ''
@jschee
jschee / active_storage tutorial aliyun as example
Last active April 27, 2020 04:08
active_storage tutorial aliyun as example
#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
@jschee
jschee / Turbolinks meta head tag
Last active April 27, 2020 22:25
Turbolinks meta head tag
@jschee
jschee / rails new project
Last active April 28, 2020 07:24
rails new project
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
@jschee
jschee / prawn fixed header & footer combination with padded box helper
Last active June 10, 2020 19:48
prawn fixed header & footer combination with padded box helper
@jschee
jschee / css code snippet sparkle cms
Last active June 27, 2020 21:51
css code snippet for sparkle cms
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
@jschee
jschee / walmart.rb
Last active November 13, 2020 06:29
ps5 walmart browser automation
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