(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.
var React = require('react'); | |
var events = require('add-event-listener'); | |
var isVisible = require('../isVisible'); | |
var LazyLoad = React.createClass({ | |
displayName: 'LazyLoad', | |
propTypes: { | |
distance: React.PropTypes.number, | |
component: React.PropTypes.node.isRequired, | |
children: React.PropTypes.node.isRequired |
(function() { | |
function status(response) { | |
if (response.ok) { | |
return response | |
} else { | |
var error = new Error(response.statusText || response.status) | |
error.response = response | |
throw error | |
} | |
} |
(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.
(function() { | |
'use strict'; | |
var indexOf = function(list, needle) { | |
if (list.indexOf) return list.indexOf(needle); | |
for (var i = 0, n = list.length; i < n; i++) { | |
if (list[i] === needle) return i; | |
} | |
return -1; | |
}; |
[["Strength",313],["Dexterity",202],["Intelligence",198],["Agility",133],["Charisma",127],["Constitution",114],["Perception",91],["Stamina",68],["Willpower",62],["Speed",54],["Body",54],["Endurance",51],["Appearance",51],["Presence",50],["Luck",49],["Mind",48],["Will",47],["Wits",42],["Wisdom",34],["Brains",32],["Coordination",32],["Manipulation",31],["Awareness",31],["[no standard attributes]",31],["Reflexes",30],["Intellect",28],["Health",28],["Knowledge",27],["Soul",24],["Fitness",23],["Reasoning",22],["Power",22],["Intuition",20],["Size",19],["Looks",19],["Spirit",18],["Resolve",18],["Ego",18],["Comeliness",17],["Physical Strength",16],["Physique",16],["Influence",15],["Personality",14],["Charm",14],["Craftiness",14],["Intelligence Quotient",13],["Physical Beauty",13],["Toughness",13],["Cool",13],["Education",12],["Creativity",12],["Mental Endurance",12],["Mental Affinity",12],["Physical Prowess",12],["Physical Endurance",12],["Vigor",11],["Brawn",11],["Piety",11],["Body Pips",11],["Composure",11],["Quick |
license: gpl-3.0 |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
// Support routines for automatically reporting user timing for common analytics platforms | |
// Currently supports Google Analytics, Boomerang and SOASTA mPulse | |
// In the case of boomerang, you will need to map the event names you want reported | |
// to timer names (for mPulse these need to be custom0, custom1, etc) using a global variable: | |
// rumMapping = {'aft': 'custom0'}; | |
(function() { | |
var wtt = function(n, t, b) { | |
t = Math.round(t); | |
if (t >= 0 && t < 3600000) { | |
// Google Analytics |
// Short module explanation // Something to gather my thoughts | |
// // I think this looks cool. | |
// | |
module.exports = the_exported_function // Modules are a function. Always. | |
// | |
module.exports.extra = extra // Additional API entry points if | |
module.exports.other = other // desired. | |
// | |
var util = require('util') // Other packages from npm or core | |
var assert = require('assert') // No comma-first due to lots of |
NOW MAINTAINED IN MY DOTFILES GITHUB REPO: http://git.io/zuH1MQ