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
using System; | |
using System.IO; | |
using System.Web; | |
/// <summary> | |
/// Removes CSS from rendered HTML page. | |
/// </summary> | |
public class InlineCssModule : IHttpModule | |
{ |
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 (ko, handlers, unwrap, extend) { | |
"use strict"; | |
extend(handlers, { | |
href: { | |
update: function (element, valueAccessor) { | |
handlers.attr.update(element, function () { | |
return { href: valueAccessor() }; | |
}); | |
} | |
}, |
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 eachAsync(iter, list, delay) { | |
var i = 0, | |
stopped = false, | |
fwhenDone; | |
delay = delay || 0; | |
function run() { | |
iter(list[i], done); | |
} | |
function hold() { |
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 React = require('react-native'); | |
var { | |
StyleSheet, | |
ListView, | |
ActivityIndicatorIOS, | |
Image, | |
// ... | |
} = React; | |
var { | |
Text, |
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 React = require('react'); | |
var { Component, PropTypes } = React; | |
var throttle = require('lodash/function/throttle'); | |
class InfiniteScroll extends React.Component { | |
static propTypes = { | |
hasMore: PropTypes.bool.isRequired, | |
isLoading: PropTypes.bool.isRequired, | |
onLoadMore: PropTypes.func.isRequired, | |
threshold: PropTypes.number, |
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 Ferrisel = React.createClass({ | |
getInitialState() { | |
return { | |
panX: new Animated.Value(0), | |
panY: new Animated.Value(0) | |
}; | |
}, | |
render() { | |
var { pages } = this.props; | |
var { panX, panY } = this.state; |
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
/* | |
// All methods would return Animated values. | |
// All parameters would be either Animated Values or regular Numbers | |
// Examples: | |
// ========= | |
Animated.Add(a, b); // a + b | |
Animated.Subtract(a, b); // a - b | |
Animated.Mult(a, b); // a * b | |
Animated.Divide(a, b); // a / b |
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 UserShape from '../shapes/UserShape'; | |
import UserCard from './UserCard'; | |
import UserBadge from './UserBadge'; | |
export default class User extends React.Component { | |
static defaultProps = { | |
user: UserShape.requires(` | |
first_name, | |
last_name, | |
`) // the needs of *this* component |
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 ReactComponentPropType(props, propName, componentName, ...rest) { | |
const Component = props[propName]; | |
if (Component === undefined) return null; | |
if (typeof Component === 'function' && Component.prototype.isReactComponent) { | |
// it's a real react component | |
return null; | |
} else { | |
return new Error(`${componentName}.${propName} is expected to be a React component.`); | |
} | |
} |
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
// This file allows us to inspect the traffic going over the Native <-> JS bridge, and can be | |
// helpful for debugging. Setting this to true should never be committed to git | |
const ENABLE_BRIDGE_DEBUGGER = false; // <-- THIS SHOULD NOT BE TRUE IN MASTER!!!! | |
// if true, function arguments will get pretty printed | |
const PRETTY_PRINT = false; | |
// enable this if you want to ignore EVERY event, except for the ones that match the `FOCUSED_*` | |
// constants. If true, you configure what you want to see. If false, you configure what you DONT | |
// want to see. |
OlderNewer