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 Lightbox from 'react-images'; | |
import Button from '../Button'; | |
const MyComponent = ReactCreateClass({ | |
getInitialState() { | |
return { | |
lightboxIsOpen: false | |
}; |
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
{ | |
"company" : { | |
"name" : "Los Angeles", | |
"description" : "Company1`", | |
"address" : { | |
"street1" : "123 main st", | |
"city" : "San Diego", | |
"state" : "CA", | |
"zip" : "92101" | |
} |
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
//////////////////////////////////////////////////////////////////////////////// | |
// Excercise: | |
// | |
// http://facebook.github.io/react/docs/reusable-components.html#prop-validation | |
// | |
// - Don't access `USERS` directly in the app, use a prop | |
// - Validate Gravatar's `size` property, allow it to be a | |
// a number, or a string that can be converted to a number, | |
// ie: `size="asdf"` should warn (hint: parseInt) | |
// - in emailType, what if the prop name isn't email? what if we wanted |
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
{ | |
"OfferID":876, | |
"OfferValues":[ | |
{ | |
"key":"first-name", | |
"value":"Some" | |
}, | |
{ | |
"key":"last-name", | |
"value":"Guy" |
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
/** @jsx React.DOM */ | |
var STATES = [ | |
'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', | |
'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', | |
'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', | |
'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY' | |
] | |
var Example = React.createClass({ |
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 obj = { | |
name: "Simon", | |
age: "20", | |
clothing: { | |
style: "simple", | |
isDouche: false | |
} | |
} |
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
==> default: Running provisioner: puppet... | |
==> default: Running Puppet with site.pp... | |
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns: Loading composer repositories with package information | |
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns: Installing dependencies (including require-dev) from lock file | |
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns: - Installing zeeto/flux (dev-master f319731) | |
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns: Cloning f319731a3c54bc3e31dad07c74dec02c8d7350be | |
==> default: | |
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns: | |
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns: | |
==> default: Notice: /Stage[main]//Node[default]/Exec[composer-install-dependencies]/returns: |
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
{% if random(1) == 1 %} | |
{% set sidebarQuery = "withSidebar" %} | |
{% include 'file.html.twig' %} | |
{% else %} | |
{% set sidebarQuery = "withoutSidebar" %} | |
{% endif %} |
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
myObj = { | |
myAttr: function(){ | |
$.ajax({ | |
type: "GET", | |
url: myApi, | |
dataType: "jsonp", | |
success: function (data) { | |
return data | |
} | |
}) |