- Part 1: An Intro to Functional Programming Concepts in JavaScript
- Part 2: An Intro to Functional Programming Concepts in JavaScript
- Part 3: An Intro to Functional Programming Concepts in JavaScript
- Dipping into wu.js: autoCurry
- Haskell in ES6: Part 1
- [Haskell in ES6: Part 2](http://casualjavascript.
This file contains hidden or 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
| <!-- Place this data between the <head> tags of your website --> | |
| <title>Page Title. Maximum length 60-70 characters</title> | |
| <meta name="description" content="Page description. No longer than 155 characters." /> | |
| <!-- Twitter Card data --> | |
| <meta name="twitter:card" value="summary"> | |
| <!-- Open Graph data --> | |
| <meta property="og:title" content="Title Here" /> | |
| <meta property="og:type" content="article" /> |
This file contains hidden or 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
| <!-- Place this data between the <head> tags of your website --> | |
| <title>Page Title. Maximum length 60-70 characters</title> | |
| <meta name="description" content="Page description. No longer than 155 characters." /> | |
| <!-- Twitter Card data --> | |
| <meta name="twitter:card" value="summary"> | |
| <!-- Open Graph data --> | |
| <meta property="og:title" content="Title Here" /> | |
| <meta property="og:type" content="article" /> |
This file contains hidden or 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 gulp = require('gulp'); | |
| const plumber = require('gulp-plumber'); | |
| // css | |
| const postcss = require('gulp-postcss'); | |
| // HACK | |
| const concat = require('gulp-concat') | |
| const inject = require('gulp-inject-string') |
This file contains hidden or 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
| /** | |
| * Using Operator Mono in Atom | |
| * | |
| * 1. Open up Atom Preferences. | |
| * 2. Click the “Open Config Folder” button. | |
| * 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up. | |
| * 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden! | |
| * 5. Tweak away. | |
| * | |
| * Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png): |
This file contains hidden or 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, {PropTypes} from 'react'; | |
| import axios from 'axios'; | |
| /** | |
| * @usage | |
| * const InfinitePostsView = makeInfinite('/posts')(PostsView); | |
| */ | |
| const infinitePropType = PropTypes.shape({ | |
| data: PropTypes.array.isRequired, |
This file contains hidden or 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
| /** @jsx React.DOM */ | |
| var LopMonHoc = React.createClass({ | |
| getInitialState: function(){ | |
| return {data: []} | |
| }, | |
| loadData: function(){ | |
| $.ajax({ | |
| url: '/daotao/lops', | |
| success: function(data){ |
- Part 1: An Intro to Functional Programming Concepts in JavaScript
- Part 2: An Intro to Functional Programming Concepts in JavaScript
- Part 3: An Intro to Functional Programming Concepts in JavaScript
- Dipping into wu.js: autoCurry
- Haskell in ES6: Part 1
- [Haskell in ES6: Part 2](http://casualjavascript.
This file contains hidden or 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
| <html> | |
| <head> | |
| <script src="https://www.gstatic.com/firebasejs/3.0.0/firebase.js"></script> | |
| <title>ZeroToApp</title> | |
| <style> | |
| #messages { width: 40em; border: 1px solid grey; min-height: 20em; } | |
| #messages img { max-width: 240px; max-height: 160px; display: block; } | |
| #header { position: fixed; top: 0; background-color: white; } | |
| .push { margin-bottom: 2em; } | |
| @keyframes yellow-fade { 0% {background: #f2f2b8;} 100% {background: none;} } |
This file contains hidden or 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
| updateRenderModel(contentOffset) { | |
| var listItemHeight = ITEM_SIZE; | |
| // Use contentOffset to calculate first visible dataItem as y-position / height of item | |
| var firstVisibleItem = Math.max(0, Math.floor(contentOffset.y / listItemHeight)); | |
| var renderModelSize = BUFFER_ITEMS * 2 + DISPLAY_ITEMS; | |
| // Calculate first y-position | |
| var nextPosition = (firstVisibleItem - BUFFER_ITEMS) * listItemHeight; | |
| // Subset of dataModel to be rendered. | |
| var dataItems = this.state.dataModel.slice(firstVisibleItem, firstVisibleItem + renderModelSize); | |
| var newRenderModel = dataItems.map((dataItem, index) => { |