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
requirejs.config({ | |
baseUrl: '/js', | |
paths: { | |
'backbone': 'lib/backbone', | |
'underscore': 'lib/underscore', | |
'jquery': 'lib/jquery', | |
'hbs': 'lib/require-handlebars-plugin/hbs', | |
'templates': '../templates' | |
} | |
}); |
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 request = require('request'); | |
var moment = require('moment'); | |
var http = require('http'); | |
var colors = require('colors'); | |
var latLong = "45.5330,-122.6894"; | |
var apiKey = "a75c248d7b83806b66b281dd33e96e36"; | |
var url = 'https://api.forecast.io/forecast'; | |
url += '/' + apiKey + '/' + latLong; |
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 { Transform } = require('stream'); // use require for non-ES6 Node modules | |
class MyStream extends Transform { | |
constructor (options) { | |
super({ | |
lowWaterMark: 0, | |
encoding: 'utf8' | |
}); | |
} |
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
zip(); | |
zap(); | |
zoom(); | |
function zip () { | |
var a = 1; | |
(function () { | |
// v8 will remove the outer closure | |
debugger; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>minimap</title> | |
<style> | |
#ref { | |
display: none; | |
} | |
</style> |
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 { FlexContext, FlexBox } from 'flex'; | |
const { Component } = React; | |
class Container extends Component { | |
render () { | |
console.log('Rendering Container'); | |
return ( | |
<g> |
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
const path = require('path'); | |
module.exports = { | |
entry: './main.js', | |
output: { | |
publicPath: '/assets', | |
filename: 'bundle.js' | |
}, |
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
class Foo extends Bar () { | |
constructor () { | |
super(); | |
this.bar = 'fubar'; | |
} | |
} | |
export function FooFactory (...args) { | |
return new Foo(...args); | |
} |
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 { default as React, Component } from 'react'; | |
function makeElements () { | |
return [ | |
<h1>Hello</h1>, | |
<h1>World,</h1>, | |
<h1>How</h1>, | |
<h1>are</h1>, | |
<h1>you?</h1> | |
] |
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
export function makeConnector (store) { | |
return function connect(mapStateToProps, mapDispatchToProps, mergeProps, options = {}) { | |
// same stuff | |
return function wrapWithConnect(WrappedComponent) { | |
return class Connect extends Component { | |
// same stuff | |
constructor(props) { | |
super(props) | |
this.store = props.store || store | |
// same stuff |
OlderNewer