This file contains hidden or 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 Route = ReactRouter.Route | |
| <pre> | |
| <code>this.MyRoutes = ( | |
| <Route handler={App}> | |
| <Route name='home' handler={Home} path="/" /> | |
| </Route> | |
| ) | |
| </code></pre> | |
| ReactRouter.run(this.MyRoutes, function(Handler) { |
This file contains hidden or 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
| // ReactMap.jsx | |
| var GoogleMap = GoogleMapReact.GoogleMap; | |
| var ReactMap = React.createClass({ | |
| render: function() { | |
| return ( | |
| <div style={{height: 400}}> | |
| <h1>MAP</h1> | |
| <GoogleMap center={[59.938043, 30.337157]} zoom={12}/> |
This file contains hidden or 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 fordhamLatitude = "40.862040"; | |
| var fordhamLongitude = "-73.885699"; | |
| var Map = React.createClass({ | |
| getInitialState: function() { | |
| return {events: this.props.events}; | |
| }, | |
| componentDidMount: function() { | |
| function initialize(events) { | |
| var mapCanvas = document.getElementById("map-canvas"); |
This file contains hidden or 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
| navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia; | |
| var mediaOptions = { | |
| audio: true, | |
| video: { | |
| mandatory: { | |
| minWidth: 1280, | |
| minHeight: 720 | |
| } | |
| } |
This file contains hidden or 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
| <%= react_component("ChatRoom", @data.to_json, class: "component") %> | |
| <script> | |
| // function to get global unique ID | |
| var guid = (function() { | |
| function s4() { | |
| return Math.floor((1 + Math.random()) * 0x10000) | |
| .toString(16) | |
| .substring(1); | |
| } |
This file contains hidden or 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 ReactHelper = require(react_helper_path); | |
| var Timer = require(__component_base + '/Timer').component; | |
| describe('Timer', function(done){ | |
| var variables = require('./fixtures/userProps'); | |
| var props = variables.props; | |
| var value = 0; | |
| beforeEach(function(done) { | |
| subject = jasmineReact.render(<Timer turn={value} chatRoom={props.chat_room} handleChange={props.handleChange} currentUser={props.current_user} pusher={new variables.pusher} otherUser={props.other_user} helperText={props.helper_text}/>); |
This file contains hidden or 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 ChatRoom = React.createClass({ | |
| getInitialState: function() { | |
| var pusher = new Pusher('18cc5c3d4ea4757ca628'); | |
| var currentUserChannel = 'private-conversation.' + this.props.current_user.user.id; | |
| var otherUserChannel = 'private-conversation.' + this.props.other_user.user.id; | |
| return { | |
| turn: this.props.chat_room.turn, | |
| completed: this.props.chat_room.completed, | |
| visible: false, | |
| currentChat: this.props.first_chat, |
This file contains hidden or 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 class="container"> | |
| <div class="title-holder"> | |
| <span class="title">Tom Goldenberg</span> | |
| </div> | |
| <p class="title-contact-info"> | |
| <span class="glyphicon glyphicon-envelope header-images" id="envelope"></span> <a href="mailto:[email protected]">Email</a> | |
| <img class="header-images" id="linked-in" src="https://yt3.ggpht.com/-CepHHHB3l1Y/AAAAAAAAAAI/AAAAAAAAAAA/Z8MftqWbEqA/s900-c-k-no/photo.jpg" alt="LinkedIn" /> <a href="https://www.linkedin.com/pub/tom-goldenberg/88/54b/670">LinkedIn</a> | |
| <img class="header-images" id="github" src="http://samuelcolvin.github.io/JuliaByExample/static/github.png" alt="Github"/> <a href="https://github.com/tgoldenberg">Github</a> | |
| </p> | |
| </div> |
This file contains hidden or 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
| rails g controller pages home | |
| rails g devise:install | |
| rails g devise User | |
| rails g scaffold Puppies name:string price:integer breed:string | |
| age:integer url:string user_id:integer | |
| rails g AddDetailsToUsers name:string publishable_key:string | |
| provider:string uid:string access_code:string | |
| rails g controller charges item:string user_id:integer |
This file contains hidden or 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
| ## user.rb | |
| class User < ActiveRecord::Base | |
| .... | |
| has_many :puppies, dependent: :destroy | |
| has_many :paid_charges, class_name: 'Charge', | |
| foreign_key: 'user_id', dependent: :destroy | |
| has_many :received_charges, class_name: 'Charge', | |
| foreign_key: 'vendor_id', dependent: :destroy | |
| end | |
| ## puppy.rb |