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
| import struct | |
| import SocketServer | |
| from base64 import b64encode | |
| from hashlib import sha1 | |
| from mimetools import Message | |
| from StringIO import StringIO | |
| class WebSocketsHandler(SocketServer.StreamRequestHandler): | |
| magic = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' |
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
| FlowComponents.define("react", function(props) { | |
| this.onRendered(function() { | |
| var dom = this.find("div"); | |
| var reactProps = _.omit(props, "component", "class"); | |
| var reactClass = window; | |
| _.each(props.class.split("."), function(name) { | |
| reactClass = reactClass[name]; | |
| }); | |
| var el = React.createElement(reactClass, reactProps); |
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
| <audio controls autoplay="autoplay"><source src="http://128.199.236.178:8000/live?type=.mp3" type="audio/mp3">Your browser does not support the audio element.</audio> |
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
| <!-- BEGINS: AUTO-GENERATED MUSES RADIO PLAYER CODE --> | |
| <script type="text/javascript" src="http://hosted.musesradioplayer.com/mrp.js"></script> | |
| <script type="text/javascript"> | |
| MRP.insert({ | |
| 'url':'http://128.199.236.178:8000/live', | |
| 'codec':'mp3', | |
| 'volume':65, | |
| 'autoplay':true, | |
| 'buffering':5, | |
| 'title':'Radio Vermont', |
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 connectionRetry; | |
| Deps.autorun(function(){ | |
| var retryTime = Meteor.status().retryTime; | |
| if(retryTime && !connectionRetry){ | |
| connectionRetry = setInterval(function(){ | |
| var newRetryTime = ((Meteor.status().retryTime - (new Date()).getTime())/1000).toFixed(0); | |
| $("#meteor-connect-retry-time").html(newRetryTime); | |
| }, 1000); | |
| } |
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
| Template.templateName.isInCurrectUrl = function () { | |
| return Router.current().path == "/example" | |
| } |
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
| Meteor.methods({ | |
| DeleteUser: function(userId, userName) { | |
| check(userId, String); | |
| check(userName, Match.Any); | |
| //rest of the code | |
| } | |
| }); |