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 all+status! | |
"Get all ideas, with the status merged in." | |
[] | |
(let [statuses (into ["New"] (map :status (prod-pad.statuses/all!))) | |
ideas-with-status (map (fn [status] (map (fn [idea] (merge idea {:status status})) | |
(with-status! status))) | |
statuses)] | |
(flatten ideas-with-status))) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<script> | |
function clicked() { | |
clicked.counter = clicked.counter || 0; | |
clicked.counter++; |
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
(ns styles.hoplon | |
(:require garden.compiler | |
hoplon.core)) | |
(defmethod hoplon.core/do! :garden | |
[el _ v] | |
; Replace all the inline styles on an element with css generated by Garden. | |
; Obviously does not play nice with other methods of setting inline styles. | |
(let [vs (if (sequential? v) v [v]) | |
css (garden.compiler/compile-style vs)] |
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
(function(e,a){if(!a.__SV){var b=window;try{var c,l,i,j=b.location,g=j.hash;c=function(a,b){return(l=a.match(RegExp(b+"=([^&]*)")))?l[1]:null};g&&c(g,"state")&&(i=JSON.parse(decodeURIComponent(c(g,"state"))),"mpeditor"===i.action&&(b.sessionStorage.setItem("_mpcehash",g),history.replaceState(i.desiredHash||"",e.title,j.pathname+j.search)))}catch(m){}var k,h;window.mixpanel=a;a._i=[];a.init=function(b,c,f){function e(b,a){var c=a.split(".");2==c.length&&(b=b[c[0]],a=c[1]);b[a]=function(){b.push([a].concat(Array.prototype.slice.call(arguments, | |
0)))}}var d=a;"undefined"!==typeof f?d=a[f]=[]:f="mixpanel";d.people=d.people||[];d.toString=function(b){var a="mixpanel";"mixpanel"!==f&&(a+="."+f);b||(a+=" (stub)");return a};d.people.toString=function(){return d.toString(1)+".people (stub)"};k="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.increment people.append people.union people.track_charg |
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
function (user, context, callback) { | |
// https://github.com/auth0/rules/blob/master/rules/signup.md | |
user.app_metadata = user.app_metadata || {}; | |
var state64 = context.request.query.state || context.request.body.state; | |
// https://github.com/node-browser-compat/atob/blob/master/node-atob.js | |
var state = new Buffer(state64, 'base64').toString('binary'); | |
var statep = JSON.parse(state); | |
// short-circuit if the user has already been aliased. | |
if (user.app_metadata.mp_aliased) return callback(null, user, context); |
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
(function (e, t) { if (!t.__SV) { window.calq = t; t.init = function (e, o) { if (t.writeKey) return; t.writeKey = e; t._initOptions = o; t._execQueue = []; var m = "action.track action.trackSale action.trackHTMLLink action.trackPageView action.setGlobalProperty user.profile user.identify user.clear".split(" "); for (var n = 0; n < m.length; n++) { var f = function () { var r = m[n]; var s = function () { t._execQueue.push({ m: r, args: arguments }) }; var i = r.split("."); if (i.length == 2) { if (!t[i[0]]) { t[i[0]] = [] } t[i[0]][i[1]] = s } else { t[r] = s } }(); } }; t.__SV = 1 } })(document, window.calq || []); |
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
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; |
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
window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};for(var o=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","removeEventProperty","setEventProperties","track","unsetEventProperty"],c=0;c<p.length;c++)heap[p[c]]=o(p[c])}; |
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
(ns pattern-lib.pattern | |
(:require [hoplon.core :as h] | |
camel-snake-kebab.core)) | |
(defmacro pattern | |
[name desc f examples] | |
(list 'h/div | |
:class "pattern" | |
:id (camel-snake-kebab.core/->kebab-case-string name) |
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
(ns tween.core | |
(:require [javelin.core :as j] | |
[hoplon.core :as h])) | |
; Not actually 0 but performance.now() returns values larger than the first | |
; frame of RAF, even before we've called RAF. | |
; https://stackoverflow.com/questions/38360250/requestanimationframe-now-vs-performance-now-time-discrepancy | |
(def t (j/cell 0)) | |
(letfn [(frame [tick] | |
(reset! t tick) |
OlderNewer