$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
FoundationDB began with ambitious goals for both high performance per node and scalability. We knew that to achieve these goals we would face serious engineering challenges while developing the FoundationDB core. We'd need to implement efficient asynchronous communicating processes of the sort supported by Erlang or the Async library in .NET, but we'd also need the raw speed and I/O efficiency of C++. Finally, we'd need to perform extensive simulation to engineer for reliability and fault tolerance on large clusters.
To meet these challenges, we developed several new tools, the first of which is Flow, a new programming language that brings actor-based concurrency to C++11. To add this capability
const groupStyle = 'font-weight: normal; color: gray'; | |
const stackStyle = 'color: gray'; | |
function dispatchDecoratorFactory( ACTION ) { | |
return function dispatchDecorator( target, key, descriptor ) { | |
const fn = descriptor.value; | |
descriptor.value = function decoratedMethod( ...args ) { | |
if ( myModeFlag === 'debug' ) { | |
console.groupCollapsed( `%c${target.constructor.name}.${key}(%O) -> ${ACTION}`, groupStyle, args ); | |
console.debug( `%c${( new Error() ).stack}`, stackStyle ); |
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
query
mutation
Reference implementation also adds the third type: subscription
. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
import React, { Component } from 'react' | |
import { render } from 'react-dom' | |
import { createStore, bindActionCreators } from 'redux' | |
import { connect, Provider } from 'react-redux' | |
const increment = () => ({ type: 'increment' }) | |
const counter = (state = 0, action) => { | |
switch (action.type) { |
(defun call-process-on-buffer-to-string (command) | |
(with-output-to-string | |
(call-process-region (point-min) (point-max) shell-file-name nil standard-output nil shell-command-switch command))) | |
(defun flow-type () | |
(interactive) | |
(let* ((info (json-read-from-string | |
(call-process-on-buffer-to-string | |
(format "flow type-at-pos --json %d %d" (line-number-at-pos) (current-column))))) |
React now supports the use of ES6 classes as an alternative to React.createClass()
.
React's concept of Mixins, however, doesn't have a corollary when using ES6 classes. This left the community without an established pattern for code that both handles cross-cutting concerns and requires access to Component Life Cycle Methods.
In this gist, @sebmarkbage proposed an alternative pattern to React mixins: decorate components with a wrapping "higher order" component that handles whatever lifecycle methods it needs to and then invokes the wrapped component in its render()
method, passing through props
.
While a viable solution, this has a few drawbacks:
- There's no way for the child component to override functionality defined on the higher order component.
;;; packages.el --- cdlatex Layer packages File for Spacemacs | |
;; | |
;; Copyright (c) 2012-2014 Sylvain Benner | |
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors | |
;; | |
;; Author: Sylvain Benner <[email protected]> | |
;; URL: https://github.com/syl20bnr/spacemacs | |
;; | |
;; This file is not part of GNU Emacs. | |
;; |
The basic structure of a React+Flux application (see other examples)
- /src/actions/AppActions.js - Action creators (Flux)
- /src/components/Application.js - The top-level React component
- /src/constants/ActionTypes.js - Action types (Flux)
- /src/core/Dispatcher.js - Dispatcher (Flux)
- /src/stores/AppStore.js - The main store (Flux)
React = require("react") | |
VideoPlayerComponent = require("components/VideoPlayerComponent") | |
AppComponent = React.createClass | |
# Need to add this manually if you want it to show up in React Chrome Dev Tools | |
# See https://github.com/jsdf/coffee-react-transform/issues/16 | |
displayName: "AppComponent" | |
render: -> | |
<div> |