I hereby claim:
- I am markthethomas on github.
- I am markthomas (https://keybase.io/markthomas) on keybase.
- I have a public key whose fingerprint is 1320 1145 D2B8 3FA3 C0B6 576F 008D AAF5 7667 40DC
To claim this, I am signing this object:
'use strict'; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
jshint: { | |
options: { | |
jshintrc: '.jshintrc' | |
}, | |
all: [ | |
'Gruntfile.js', |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<style type="text/css"> | |
html { | |
height: 100% | |
} | |
body { |
//.......... | |
sprite: { | |
all: { | |
src: 'app/images/FILE_PATH_HERE/*.png', | |
destImg: 'app/images/spritesheet.png', | |
destCSS: 'app/styles/_sprites.scss', | |
'padding': 5, | |
'cssFormat': 'css', | |
// OPTIONAL: Map variable of each sprite |
//lines 100-113 of jquery.spin.js | |
lines: 13, // The number of lines to draw | |
length: 0, // The length of each line | |
width: 8, // The line thickness | |
radius: 30, // The radius of the inner circle | |
corners: 1, // Corner roundness (0..1) | |
rotate: 34, // The rotation offset | |
direction: 1, // 1: clockwise, -1: counterclockwise | |
color: '#68d274', // #rgb or #rrggbb or array of colors | |
speed: 0.8, // Rounds per second |
I hereby claim:
To claim this, I am signing this object:
(by @andrestaltz)
So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
'use strict'; | |
require('babel/register'); | |
var ourModule = require('./example'), | |
chalk = require('chalk'); | |
ourModule('Mark', function(err, message) { | |
if (err) { | |
console.error(err); |
#using debian:jessie for it's smaller size over ubuntu | |
FROM debian:jessie | |
# Replace shell with bash so we can source files | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
# Set environment variables | |
ENV appDir /var/www/app/current | |
# Run updates and install deps |
function count(array) { | |
return array.reduce((accumulator, current) => { | |
accumulator[current] = ++accumulator[current] || 1; | |
return accumulator; | |
}, {}); | |
} | |
// Explanation: takes in an array and iterates over it with the reduce function. A callback is fired on each | |
// item in the array, with an accumulator and current value as args. The key thing is seeing that the default value of | |
// the accumulator is set to an object that we can write to ({}). Then, as we iterate through the values, |
{ | |
"global": { | |
"devDependencies": { | |
"babel": "^6.0.14", | |
"eslint": "^1.8.0", | |
"mocha": "^2.3.3", | |
"pm2": "^0.15.8", | |
"bluebird": "^3.0.5" | |
}, | |
"dependencies": { |