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 {connect} from 'react-redux'; | |
import _ from 'lodash'; | |
/** | |
* Higher ordered component for pages requiring authentication. | |
*/ | |
const AuthenticatedPage = (PageComponent) => { | |
class AuthenticatedPageHOC extends React.Component { | |
componentWillReceiveProps(nextProps) { |
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
from pathlib import Path | |
import pytest | |
import time | |
from selenium.webdriver.common.keys import Keys | |
pytestmark = pytest.mark.django_db | |
@pytest.mark.volatile | |
class TestCreateProject: |
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 async function getCardPage(req, res, next) { | |
try { | |
const query = parseCardQuery(req.query); | |
const cardId = req.params.id; | |
const [card, campaign] = await Promise.all([ | |
CardApi.getCard(cardId), | |
getCardCampaign(cardId, query.campaignId) | |
]); |
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 shareUrl = document.location.origin + document.location.pathname; | |
var knownButtons = ['google-plus', 'twitter', 'pinterest', 'facebook', 'stumbleupon', 'linkedin']; | |
/** | |
* jQuery plugin - create share buttons | |
* | |
* @param {Object} [options] | |
* @param {string[]} [options.buttons] - list of share buttons to be shown | |
* @param {string} [options.url] - shared URL (by default current) |
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
<div id="main"/> | |
<script type="text/jsx"> | |
/** @jsx React.DOM */ | |
var DragItem = React.createClass({ | |
drag: function(ev) { | |
ev.dataTransfer.setData("draggedItem", JSON.stringify(this.props.item)); | |
}, | |
render: function () { | |
return (<div draggable="true" onDragStart={this.drag} className="item">{this.props.item.text}</div>); | |
} |