Method | Side effects1 | State updates2 | Example uses |
---|---|---|---|
Mounting | |||
componentWillMount |
✓ | Constructor equivalent for createClass |
|
render |
Create and return element(s) | ||
componentDidMount |
✓ | ✓ | DOM manipulations, network requests, etc. |
Updating | |||
componentWillReceiveProps |
✓ | Update state based on changed props |
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
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
# Ubuntu 20/22 dev Server | |
# Run like (without sudo) - bash install_lamp.sh | |
# Script should auto terminate on errors | |
export DEBIAN_FRONTEND=noninteractive |
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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"fade_fold_buttons": false, | |
"font_face": "Hack", | |
"font_size": 10, | |
"ignored_packages": | |
[ |
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
{ | |
"always_show_minimap_viewport": true, | |
"auto_indent": true, | |
"auto_match_enabled": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Base16 Color Schemes/base16-default.dark.tmTheme", | |
"detect_indentation": false, | |
"draw_minimap_border": true, | |
"draw_white_space": "selection", | |
"ensure_newline_at_eof_on_save": true, |
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
'use strict'; | |
var React = require('react/addons'); | |
var _ = require('lodash'); | |
var setClass = React.addons.classSet; | |
var MediaObject = React.createClass({ | |
render: function () { | |
var classes = setClass({ | |
'media-left': this.props.horizontalAlignment === 'left', |
(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.
Here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft CMS.
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
.cm-s-tomorrow-night-eighties.CodeMirror { background: #2d2d2d; color: #cccccc; } | |
.cm-s-tomorrow-night-eighties .CodeMirror-selected { background: #515151 !important; } | |
.cm-s-tomorrow-night-eighties .CodeMirror-gutters { background: #2d2d2d; border-right: 0; } | |
.cm-s-tomorrow-night-eighties .CodeMirror-linenumber { color: #7C7C7C; } | |
.cm-s-tomorrow-night-eighties .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; } | |
.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { border-bottom: 1px solid #999999; color: #cccccc !important; } | |
.cm-s-tomorrow-night-eighties .CodeMirror-nonmatchingbracket { color: red !important; } | |
.cm-s-tomorrow-night-eighties .cm-keyword { color: #cc99cc; } | |
.cm-s-tomorrow-night-eighties .cm-atom { color: #f99157; } |
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
<?php | |
/** | |
* Usage: | |
* Send the url you want to access url encoded in the url paramater, for example (This is with JS): | |
* /twitter-proxy.php?url='+encodeURIComponent('statuses/user_timeline.json?screen_name=MikeRogers0&count=2') | |
*/ | |
// The tokens, keys and secrets from the app you created at https://dev.twitter.com/apps | |
$config = array( |
NewerOlder