(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
} | |
NodeList.prototype.__proto__ = Array.prototype; |
/* global famous */ | |
define(function(require, exports, module) { | |
var Utility = famous.utilities.Utility; | |
var MouseSync = famous.inputs.MouseSync; | |
var TouchSync = famous.inputs.TouchSync; | |
var ScrollSync = famous.inputs.ScrollSync; | |
var GenericSync = famous.inputs.GenericSync; | |
var Transitionable = famous.transitions.Transitionable; | |
var Easing = famous.transitions.Easing; |
// array utils | |
// ================================================================================================= | |
const combine = (...arrays) => [].concat(...arrays); | |
const compact = arr => arr.filter(Boolean); | |
const contains = (() => Array.prototype.includes | |
? (arr, value) => arr.includes(value) | |
: (arr, value) => arr.some(el => el === value) |
<html> | |
<head> | |
<script src="clmtrackr.js"></script> | |
<script src="model_pca_20_svm.js"></script> | |
<script src="p5.js"></script> | |
<script src="p5.dom.js"></script> | |
<script> | |
var ctracker; |
var isWeixin = false; | |
if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") { | |
isWeixin = true; | |
} else { | |
if (document.addEventListener) { | |
document.addEventListener("WeixinJSBridgeReady", function() { isWeixin = true; }, false); | |
} else if (document.attachEvent) { | |
document.attachEvent("WeixinJSBridgeReady", function() { isWeixin = true; }); | |
document.attachEvent("onWeixinJSBridgeReady", function() { isWeixin = true; }); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
library wildcard_filter; | |
import 'package:angular/angular.dart'; | |
class WildcardFilter{ | |
static final String DEFAULT_SEPARATOR = ' '; | |
/* | |
* AngularJS Filter fnc "call" |
[ Launch: Lorenz Curve ] 9767676 by stevekinney
This is an example of how to scaffold API endpoints to list / get / create / update / delete Posts in a Keystone website.
It's a modification of the default project created with the yo keystone
generator (see https://github.com/JedWatson/generator-keystone)
Gists don't let you specify full paths, so in the project structure the files would be:
routes-index.js --> /routes/index.js // modified to add the api endpoints
routes-api-posts.js --> /routes/api/posts.js // new file containing the Post API route controllers
function consoleLogo(width,height,url,comment){ | |
'use strict'; | |
//config | |
var lineHeight = 14; | |
//build string | |
var str = ''; | |