This is helpful if you've previously installed git from source on OSX, and other compilers can't find the correct path. You need to remove the current version of git, then re-install with brew.
- Check which git you're running:
which git
{ | |
"colorScheme": "Campbell", | |
"commandline": "pwsh.exe -ExecutionPolicy ByPass -NoExit -Command \"& '%USERPROFILE%\\anaconda3\\shell\\condabin\\conda-hook.ps1' ; conda activate '%USERPROFILE%\\anaconda3' \"", | |
"guid": "{e7d34d61-5a57-4f38-8eab-91cb777b0c26}", | |
"hidden": false, | |
"icon": "%USERPROFILE%\\anaconda3\\Menu\\anaconda-navigator.ico", | |
"name": "Anaconda PowerShell Prompt", | |
"startingDirectory": "%USERPROFILE%" | |
} |
This is helpful if you've previously installed git from source on OSX, and other compilers can't find the correct path. You need to remove the current version of git, then re-install with brew.
which git
// Custom made dynamoose declaration file. | |
declare module "dynamoose" { | |
export function local(url: string): void; | |
export function model<DataSchema, KeySchema, ModelSchema extends Model<DataSchema>>( | |
modelName: string, | |
schema: Schema, | |
options?: ModelOption | |
): ModelConstructor<DataSchema, KeySchema, ModelSchema>; | |
export function setDefaults(options: ModelOption): void; |
function isIterator(obj) | |
{ | |
return obj&&obj.next&&obj.throw; | |
} | |
function isRunWithContext(obj) | |
{ | |
return obj&&typeof obj=='function'&&obj.ctx; | |
} |
Make writing asynchronous code easier by having a consistent way of propagating "context" across related asynchronous operations. Have the "context" be responsible for async-local-storage, allowing the execution before and after hooks, and "context"-local error handling. Finally make sure that the "context"s are composable.
This feature needs to be part of the platform so that library and framework authors can relay on a common well know API, otherwise adoption will be limited.
While the standard 80 character limit for source code can be traced back to the | |
IBM punch card[1] it can still be seen as a good upper bound for how long lines | |
of text should be on modern high definition displays. | |
First thing we must acknowledge is that source code is not read in the | |
traditional sense. Instead developers scan the source using non-linear eye | |
movements[2] or stay fixated in a small area of code while working out the | |
logical details of code being written. The fixation on a single location, even | |
for more than a few seconds, leads to a loss of visual accuity. Which occurs | |
when the eyes do not perform frequent saccadic eye movements.[3] Further |
import _ from 'lodash'; | |
import angular from 'angular'; | |
import 'angular-new-router'; | |
import 'oclazyload'; | |
function AppController ( ) { | |
} | |
AppController.$routeConfig = []; |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
var express = require('express'); | |
var cookieParser = require('cookie-parser'); | |
var session = require('express-session'); | |
var flash = require('express-flash'); | |
var handlebars = require('express-handlebars') | |
var app = express(); | |
var sessionStore = new session.MemoryStore; | |
// View Engines |
On an architectural level, the way we craft large-scale applications in JavaScript has changed in at least one fundamental way in the last four years. Once you remove the minutia of machinery bringing forth data-binding, immutable data-structures and virtual-DOM (all of which are interesting problem spaces) the one key concept that many devs seem to have organically converged on is composition. Composition is incredibly powerful, allowing us to stitch together reusable pieces of functionality to "compose" a larger application. Composition eschews in a mindset of things being good when they're modular, smaller and easier to test. Easier to reason with. Easier to distribute. Heck, just look at how well that works for Node.
Composition is one of the reasons we regularly talk about React "Components", "Ember.Component"s, Angular directives, Polymer elements and of course, straight-up Web Components. We may argue about the frameworks and libraries surrounding t