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
const jwt = require('jsonwebtoken'); | |
const privateKey = 'secret'; | |
module.exports = function (req, res, next) { | |
const oldSend = res.json; | |
const token = req.headers.authorization; | |
var body = req.body; | |
//When returning json from a username+password request, return a signed token |
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
<View style={{flex:1}}> | |
<View style={{flex:1}}> | |
<Button><Text>Hi</Text></Button> | |
<ListItem><Text>Hi</Text></ListItem> | |
<Switch onChange={this.toggleState("switchVal")} value={this.state.switchVal}/> | |
<Checkbox onChange={this.toggleState("checkboxVal")} value={this.state.checkboxVal}/> | |
<Radio onChange={this.toggleState("radioVal")} value={this.state.radioVal}/> | |
<Loader/> | |
<TextInput |
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.content = Autolinker.link( content, { | |
replaceFn: function (autolinker, match) { | |
switch (match.getType()) { | |
case 'url' : | |
if (match.url.match(/\.(jpeg|jpg|gif|png)$/) != null) { | |
image = match.url; | |
if (image.indexOf('http') !=0) { | |
image = 'http://'+image; | |
} | |
} else if (Modernizr.video && match.url.match(/\.(mp4|webm)$/) != null) { |
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 */ | |
module.exports = function (options) { | |
return React.createClass( _.assign({}, options, { | |
_listeners: [], | |
listenTo: function (store, event, callback) { | |
this._listeners.push({ | |
store: store, | |
event: event, |
NewerOlder