This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PIXI = require('pixi.js/bin/pixi.dev.js'); | |
/** | |
* Data model and serialization. | |
*/ | |
module.exports = (function() { | |
'use strict'; | |
/** | |
* URL-safe character mapping. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
header: { | |
childrenGenerator: [ | |
{ component: Sorter, options: { | |
options: _ => TeamStore.getAllSorted(), | |
value: _ => this.state.team, | |
stringKey: "name", | |
modifier: "-large -float", | |
onChange: _ => this.handleTeamChange, | |
showAll: "Instrument" } }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getAll: function(withDeleted) { | |
return _(this[collectionName]) | |
.keys() | |
.map(k => this[collectionName][k]) | |
.filter(o => !withDeleted && !o.deletedAt) | |
.value(); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Immutable = require("immutable"), | |
t = require("transducers-js"), | |
comp = t.comp, | |
map = t.map, | |
filter = t.filter, | |
transduce = t.transduce; | |
var inc = function(n) { return n + 1; }; | |
var isEven = function(n) { return n % 2 == 0; }; | |
var sum = function(a,b) { return a+b; }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Middleman::SplitterExtendion < ::Middleman::Extension | |
option :split_count, 2, 'How many files to split into' | |
option :split_files, nil, 'Which files to split' | |
register :splitter | |
def initialize(app, options_hash={}, &block) | |
super | |
require 'css_splitter/splitter' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn home-api-map | |
[] | |
{ :banner (model/pick :banner {:where {:slug "home"}}) | |
:intro-headline (model/pick :headline {:where {:slug "intro"}}) | |
:intro-slides (model/gather :slides {:where {:slug "intro"} :include {:slides {}}}) | |
:intro-highlights (model/gather :highlight {:where {:slug "intro"}}) | |
:tenants (model/gather :tenant) | |
:partners (model/gather :neighborhood-partner) | |
:whats-here-headline (model/pick :headline {:where {:slug "whats-here"}}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn load-json-channels-in-parallel | |
[channels] | |
(let [ch (chan)] | |
(go | |
(loop [open-channels channels | |
data {}] | |
(if (empty? open-channels) | |
(do | |
(>! ch data) | |
(close! ch)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn setup-scroll-watcher | |
[body-class] | |
(let [body-class (name body-class) | |
listener (shared/listen js/window :scroll) | |
debounced (shared/debounce listener 200)] | |
(dom/add-class! (.-body js/document) body-class) | |
(go | |
(loop [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Option A | |
.slide-show__paging-button--next { | |
float: right; | |
} | |
// Option B | |
.Slideshow-pagingButton--next { | |
float: right; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin hoverable { | |
.hover &:hover { | |
@content; | |
} | |
} | |
#elem { | |
@include hoverable { | |
font-weight: bold; | |
} |