Skip to content

Instantly share code, notes, and snippets.

View brookslyrette's full-sized avatar
🏠
Working from home from now until forever.

Brooks Lyrette brookslyrette

🏠
Working from home from now until forever.
View GitHub Profile
import React from 'react';
class UserForm extends React.Component {
render() {
return (
<div>
<form>
<input type="text" value={this.context.user.username}/>
<input type="text" value={this.context.user.email}/>
</form>
import React from 'react';
class AppContext extends React.Component {
getChildContext() {
return {
user: this.props.user,
};
}
@Test
@WithOrganization("dotsub")
@WithUserDetails("[email protected]")
public void testTrackTranslateHasDirection() throws Exception {
new TrackTranslatePage(driver).get(12, 14, 20)
.checkForCaption("The Peach Open Move Project Presents", 1)
.checkForTranslation("ويعرض مشروع الفيلم الخوخ المفتوحة", 1")
.checkForDirection("rtl", 1);
}
import React from 'react';
const MediaView = (props) => {
if (props.video) {
return (
<div>
<h1 className="videoTitle">{props.video.title}</h1>
<p className="videoDescription">
{props.video.description}
</p>
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { loadVideo } from '../../actions/video/loadVideoActionCreators.jsx';
class VideoContainer extends React.Component {
componentWillMount() {
this.props.loadVideo(this.props.params.id);
}
<Route component={VideoContainer}>
<Route path="/video/:id" component={VideoView} />
<Route path="/video/:id/edit" component={VideoEdit} />
</Route>
<Route component={VideoContainer}>
<Route path="/video/:id" component={VideoView} />
</Route>
function starWarsIntro() {
var intro = document.getElementsByClassName('intro')[0];
var logo = document.getElementsByClassName('logo')[0];
var scroll = document.getElementsByClassName('scroll')[0];
var tilt = document.getElementsByClassName('tilt')[0];
// fade in the blue text
intro.classList.add('fadeIn');
// fade out the blue text
.starWars .scroll {
position: absolute;
top: 30%;
width: 100%;
max-height: 100%;
color: #ffd700;
font-family: 'Droid Sans', sans-serif;
font-weight: bold;
font-size: 44px;
<html>
<head>
<link href='https://cdnjs.cloudflare.com/ajax/libs/normalize/4.1.1/normalize.css' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div class="starWars">
<div class="intro">