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
function render() { | |
container.innerHTML = data.map(function(val) { | |
return '<li>' + val + '</li>'; | |
}).join(''); | |
} |
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
function() { | |
var val = input.value; | |
if (val) { | |
data.push(val); | |
input.value = ''; | |
render(); | |
} | |
} |
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 items = [{ sold: true}, {sold: false}, {sold: true}]; | |
for (var i = 0; i < items.length; i++) { | |
if (items[i].sold) { | |
console.log('you done bought me'); | |
} | |
} |
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
function Car(make, model) { | |
this.make = make; | |
this.model = model; | |
var miles = 0; | |
this.increasMiles = function() { | |
miles++; | |
}; | |
} |
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 CLIENT_ID = 'nope'; | |
class Matcher extends React.Component { | |
constructor(props: { imageCount: number }) { | |
super(props); | |
this.state = { images: [] }; | |
this.fetchRandomImages(this.props.imageCount); | |
} |
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
unbind C-b | |
set -g prefix C-w | |
# pane switching | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# pane creation |
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 { Link } from 'react-router'; | |
import copy from 'shared/constants/copy'; | |
import PostComments from 'shared/components/PostComments'; | |
import PostCommentControls from 'shared/components/PostCommentControls'; | |
import FluxComponent from 'flummox/component'; | |
export default class PostComment extends React.Component { | |
constructor(props) { | |
super(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
import React from 'react'; | |
import PostComment from 'shared/components/PostComment'; | |
import copy from 'shared/constants/copy'; | |
import randomColor from 'shared/util/random_color'; | |
import FluxComponent from 'flummox/component'; | |
import Ad from 'shared/components/Ad'; | |
export default class PostComments extends React.Component { | |
shouldComponentUpdate(nextProps, nextState) { | |
if (nextProps.comments === this.props.comments) { |
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 default class IsomorphicComponent extends React.Component { | |
// this only executes on the browser | |
componentDidMount() { | |
const wrapper = React.findDOMNode(this.refs.app); | |
wrapper.style.left = wrapper.getBoundClientRect().left + 'px'; | |
} | |
// this executes on the server and the browser | |
render() { | |
return ( |
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
EBGUIP = window.EBGUIP || {}; | |
EBGUIP.SizmekDI = function(options, extra) { | |
this.options = options || {}; | |
var t = []; | |
this.languageKey(t); | |
this.languagesKey(t); | |
this.hasLiedLanguagesKey(t); | |
this.colorDepthKey(t); | |
this.screenResolutionKey(t); | |
this.availableScreenResolutionKey(t); |