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 { autobind } from 'lib/decorators'; | |
class AwesomeClass { | |
@autobind | |
awesomeMethod() { | |
console.log('parent called, AWESOME METHOD'); | |
} | |
} |
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 ace = require('brace'); | |
var React = require('react'); | |
module.exports = React.createClass({ | |
displayName: 'ReactAce', | |
propTypes: { | |
mode : React.PropTypes.string, | |
theme : React.PropTypes.string, | |
name : React.PropTypes.string, |
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 StoreListenerMixin = function(...stores) { | |
var StoreMixin = { | |
getInitialState() { | |
return this.getStateFromStores(this.props); | |
}, | |
componentDidMount() { | |
stores.forEach(store => store.addChangeListener(this.handleStoresChanged)); | |
this.setState(this.getStateFromStores(this.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
<!DOCTYPE html> | |
<head> | |
<!-- React JS --> | |
<script src="http://fb.me/react-0.10.0.min.js"></script> | |
<script src="http://fb.me/JSXTransformer-0.10.0.js"></script> | |
<!-- Firebase JS --> | |
<script src="https://cdn.firebase.com/js/client/1.0.17/firebase.js"></script> | |
<!-- Firebase Login JS --> | |
<script src="https://cdn.firebase.com/js/simple-login/1.6.1/firebase-simple-login.js"></script> |
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
<?php | |
/** | |
* The main query for extracting the slides for the slideshow | |
*/ | |
public function get_slides() { | |
$args = array( | |
'force_no_custom_order' => true, | |
'orderby' => 'menu_order', | |
'order' => 'ASC', | |
'post_type' => 'attachment', |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>POC</title> | |
<style> | |
#canvas { | |
display: none; | |
} | |
</style> |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>POC</title> | |
<style> | |
#canvas { | |
display: none; | |
} | |
</style> |
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
//variant of https://gist.github.com/Contra/6368485 | |
(function () { | |
var isStorageAvailable = function (storage) { | |
if (typeof storage == 'undefined') return false; | |
try { // hack for safari incognito | |
storage.setItem("storage", ""); | |
storage.getItem("storage"); | |
storage.removeItem("storage"); |