(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| class Foo | |
| class << self | |
| def exec | |
| something | |
| rescue => ex | |
| ex.message | |
| end | |
| def something | |
| "something" |
| /** @jsx React.DOM */ | |
| var ReactDropzone = React.createClass({ | |
| componentDidMount: function() { | |
| var options = {}; | |
| for (var opt in Dropzone.prototype.defaultOptions) { | |
| var prop = this.props[opt]; | |
| if (prop) { | |
| options[opt] = prop; | |
| continue; |
| # alias to edit commit messages without using rebase interactive | |
| # example: git reword commithash message | |
| reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f" | |
| # git alias to download single file from a repo in format of user/repo file | |
| fetch-file = "!f() { out=\"${4:-$(basename \"$2\")}\"; if gh api \"repos/$1/contents/$2\" ${3:+-f ref=$3} --jq '.content' 2>/dev/null | base64 --decode > \"$out\" 2>/dev/null; then echo \"Downloaded $2 → $out\"; else echo \"Failed\"; rm -f \"$out\"; fi; }; f" | |
| # git alias to download single file from a repo in the format of user/repo/file | |
| fetch-file = "!f() { repo=\"$(echo $1 | cut -d/ -f1-2)\"; file=\"$(echo $1 | cut -d/ -f3-)\"; out=\"${3:-$(basename \"$file\")}\"; if gh api \"repos/$repo/contents/$file\" ${2:+-f ref=$2} --jq '.content' 2>/dev/null | base64 --decode > \"$out\" 2>/dev/null; then echo \"Downloaded $file → $out\"; else echo \"Failed\"; rm -f \"$out\"; fi; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
React: a robust functional view layer.
View code and templating are combined as JavaScript.
In JavaScript you create a virtual DOM, react diffs changes between the last virtual DOM and the next, mutating the real DOM only as necessary to reflect the changes. This has huge implications for cognitive
| /** @jsx React.DOM */ | |
| 'use strict'; | |
| var React = require('react'), | |
| { PropTypes } = React; | |
| var AudioPlayer = React.createClass({ | |
| propTypes: { | |
| source: PropTypes.string.isRequired, | |
| isPlaying: PropTypes.bool.isRequired, |
This blog post series has moved here.
You might also be interested in the 2016 version.
| . | |
| ├── actions | |
| ├── stores | |
| ├── views | |
| │ ├── Anonymous | |
| │ │ ├── __tests__ | |
| │ │ ├── views | |
| │ │ │ ├── Home | |
| │ │ │ │ ├── __tests__ | |
| │ │ │ │ └── Handler.js |