Skip to content

Instantly share code, notes, and snippets.

View jess's full-sized avatar

Jess Brown jess

View GitHub Profile
## js at bottom of layout
# source https://www.npmjs.com/package/vanilla-lazyload
<script>
(function(w, d){
var b = d.getElementsByTagName('body')[0];
var s = d.createElement("script");
var v = !("IntersectionObserver" in w) ? "8.17.0" : "10.19.0";
s.async = true; // This includes the script as async. See the "recipes" section for more information about async loading of LazyLoad.
s.src = "https://cdn.jsdelivr.net/npm/vanilla-lazyload@" + v + "/dist/lazyload.min.js";
w.lazyLoadOptions = {/* Your options here */};

POST Request To Create User API Endpoint On You Got This System

/users?api_key?sldfjslkdfjljslkdfj

{
  "email": 'jess@csepub.com',
  first_name: 'first',
 last_name: 'last_name',

TRACT Account Setup Requirements

First time setup

Products

We will need to know the products that you want to track. This should probably be done when you first setup your account though the web app. We have a large list of possible products categorized by:

<ul>
<!-- SLIDE -->
<li data-index="rs-19"
data-transition="zoomout"
data-slotamount="default"
data-easein="Power4.easeInOut"
data-easeout="Power4.easeInOut"
data-masterspeed="2000"
data-thumb="/revolution-slider/assets/images/timelapse-100x50.jpg"
data-rotate="0"
Spree::Product::ElasticsearchQuery.class_eval do
def query_fields
['_all']
end
end
Spree::Product.class_eval do
has_many :model_numbers, class: Spree::ModelNumber, foreign_key: "spree_product_id", dependent: :destroy
has_many :vendors, class: Spree::Vendor, through: :model_numbers
has_many :tags, class: Spree::ProductTag, foreign_key: "spree_product_id", dependent: :destroy
<a href="<%= lesson_path(syllabus.user_module.course_module, user_lesson.lesson) %>" class="<%= user_lesson.state %> <%= user_lesson.current_status %>"><span><%= user_lesson.title %></span> ( <%= user_lesson.state %> )</a>
<a href="<%= lesson_path(syllabus.user_module.course_module, user_lesson.lesson) %>" class="<%= user_lesson.state %> <%= user_lesson.current_status %>"><span><%= user_lesson.number %></span> <%= user_lesson_.name %>( <%= user_lesson.state %> )</a>
[123,
167,
448,
857,
869,
943,
1175,
1216,
1274,
1833,
{
"user_picks":
{
"parcel_id": 18,
"shipment_id": 5,
"product_picks":
[
{
"id": 3,
"allotment": 1,
@jess
jess / gist:df78c4cb95a81ced403d
Created July 15, 2014 17:55
heroku output on bower install
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Using Node.js version: 0.10.21
-----> Installing JavaScript dependencies using Bower 1.3.6
bower MutationObserver#0.3.3 cached git://github.com/Polymer/MutationObservers.git#0.3.3
bower MutationObserver#0.3.3 validate 0.3.3 against git://github.com/Polymer/MutationObservers.git#0.3.3
bower jquery#1.11.1 cached git://github.com/jquery/jquery.git#1.11.1
bower jquery#1.11.1 validate 1.11.1 against git://github.com/jquery/jquery.git#1.11.1
bower jquery-ujs#1.0.0 cached git://github.com/rails/jquery-ujs.git#1.0.0
bower jquery-ujs#1.0.0 validate 1.0.0 against git://github.com/rails/jquery-ujs.git#1.0.0
@jess
jess / foundation_menu.rb
Last active February 5, 2016 22:29
Use foundation top bar menu in Refinery CMS
# app/models/foundation_menu
class FoundationMenu < Refinery::Pages::MenuPresenter
private
def render_menu(items)
content_tag(:section, :id => "nav", :class => 'top-bar-section') do
render_menu_items(items)
end
end