- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
Discover gists
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// When you click the button on the right, this program | |
// retrieves a stock quote from a stubbed method. If the | |
// button is clicked while a (stubbed/fake) network request | |
// is in-flight, then the fake request is cancelled and | |
// a new one is issued. To confirm this, press the button | |
// several times and notice that only one stock quote is | |
// returned. | |
var Task = require('task-lib'); | |
var getQuoteButton = document.getElementById('getQuote'); |
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
// When you click the button on the right, this program | |
// retrieves a stock quote from a stubbed method. If the | |
// button is clicked while a (stubbed/fake) network request | |
// is in-flight, then the fake request is cancelled and | |
// a new one is issued. To confirm this, press the button | |
// several times and notice that only one stock quote is | |
// returned. | |
var Task = require('task-lib'); | |
var getQuoteButton = document.createElement('button'); |
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
interface Iterable { | |
Generator @@iterator(Generator); | |
} | |
interface Observable { | |
Generator observer(Generator); | |
} | |
Array.prototype[@@observer] = function(generator) { | |
var decoratedGenerator = Object.create(generator), |
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
/* | |
* Performs a exclusive map waiting for the first to finish before subscribing to another observable. | |
* Observables that come in between subscriptions will be dropped on the floor. | |
* @param {Function} selector Selector to invoke for every item in the current subscription. | |
* @param {Any} [thisArg] An optional context to invoke with the selector parameter. | |
* @returns {Observable} An exclusive observable with only the results that happen when subscribed. | |
*/ | |
observableProto.exclusiveMap = function (selector, thisArg) { | |
var sources = this; | |
return new AnonymousObservable(function (observer) { |
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
// example using the raf module from npm. try changing some values! | |
var Rx = require('rx'); | |
window.Rx = Rx; | |
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),(f.falkor||(f.falkor={})).PathEvaluator=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ | |
var Rx = _dereq_("../src/rx.ultralite"); | |
var Observable = Rx.Observable, | |
Disposable = Rx.Disposable, | |
sentinelSize = 50, | |
isArray = Ar |
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 print = console.log.bind(console); | |
// partial implementation of Array.from | |
Array.from = function(iterable) { | |
var results = []; | |
for(var x of iterable) { | |
results.push(x); | |
} | |
return results; | |
}; |
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
import React from 'react'; | |
import { CircularProgress, LinearProgress } from '@material-ui/core/'; | |
/** | |
* Wraps the React Component with React.Suspense and FallbackComponent while loading. | |
* @param {React.Component} WrappedComponent - lazy loading component to wrap. | |
* @param {React.Component} FallbackComponent - component to show while the WrappedComponent is loading. | |
*/ | |
export const withSuspense = (WrappedComponent, FallbackComponent = null) => { | |
return class extends React.Component { |
NewerOlder