Skip to content

Instantly share code, notes, and snippets.

View jschee's full-sized avatar

Jason jschee

  • New Brunswick, New Jersey
View GitHub Profile
@jschee
jschee / gist:c81aea565bcc1b75a92823b99cec7a7d
Last active March 12, 2024 20:22
How to add Vue.js in your Ruby on Rails project with importmaps
@jschee
jschee / clear_queue.rb
Created November 13, 2020 18:23
clear_queue.rb
## 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
@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
@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 / 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 / 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 / Turbolinks meta head tag
Last active April 27, 2020 22:25
Turbolinks meta head tag
@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 / 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 / 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 ———————————————————————————————————— •