Skip to content

Instantly share code, notes, and snippets.

View ScottLNorvell's full-sized avatar
🦍
maybe doing this?

Scott Norvell ScottLNorvell

🦍
maybe doing this?
View GitHub Profile
@ScottLNorvell
ScottLNorvell / Brewfile
Created November 3, 2021 15:52 — forked from ryanhanwu/Brewfile
New Mac Setup Script 2021
# Taps
tap 'homebrew/cask-fonts'
tap 'homebrew/cask-versions'
tap 'heroku/brew'
# Install CLI Tools
## Shell Utilities
brew 'coreutils'
brew 'findutils'
brew 'autojump'

Interlude Player on SPAs and PWAs

Terms:

Just so we're all on the same page:

  • SPA: Short for Single Page Application.
  • PWA: Short for Progressive Web Application

Types and Examples:

  • FULL SPAs: Every link loads the next page using Javascript. Examples: TheScene and Pitchfork
  • PARTIAL SPAs: Certain actions cause a route change or new content to be added to the application. Examples: Vogue and other's infinite scroll feature

Javascript Closures and Building a Public API

What is a Closure?

function closure() {
  // THIS IS
}

if (true) {
 // SO IS THIS

Script Embed in Frontend Migration


            |    |              _.-7
            |\.-.|             ( ,(_
            | a a|              \\  \,
            ) ["||          _.--' \  \\
         .-'  '-''-..____.-'    ___)  )\
 F _/-``-.__;-.-.--`--' . .' \_L_

Vemba conde implementation

var _onCondePlayerReady = function(player) {
    /**
     * not sure which elementId you are looking for, but we could try to expose it
     * or you mentioned you could come up with a workaround?
     * targetDiv was never part of our public api, so I'm not even 
     * sure what it referenced
     */
<!--
Player
PosterImage
TextTrackDisplay
LoadingSpinner
BigPlayButton
ControlBar
PlayToggle
FullscreenToggle

Get This Working:

Make some in-repo addons

  • keep src where it is? (js/css)
  • use addon to selectively load elements of rx

Here is an example of how to selective load deps:

// from ember-cli-d3
included: function(app) {

Each CneCategory Gets its Own Model!

Public Attributes: (sent from api)

  • id: the id of the mongodb object
  • name: The display name of the category: (referred to in places as "Friendly Name")
  • key: The "key" (i.e. "Style--Fashion--Women")
  • slug: the slug of the object
    • based off of category key
    • will need to change when name changes
  • image_key: (for rendering images...)