Skip to content

Instantly share code, notes, and snippets.

Chromecast App Receiver

Info

We are currently developing an iOS and Android application that will replace NewSpring's current apps. The current app supports video playback on a Chromecast, but we have not added that feature to the new app yet. We use Ooyala for our video streaming. Their new HTML5 player has support for Chromecasting, so their examples are hopefully good.

The way Chromecasting works is like this:

  1. Client finds Chromecast on network
  2. Client sends request to stream to Chromecast with registered ID
function* login() {
const currentState = yield select();
const { data } = currentState.accounts;
if (data.email && data.password) {
const { email, password } = data;
// set the UI to show the loading screen
yield put(actions.loading());

Holtzmann Training

Overview

Install Holtzmann

  • nvm/node
  • run project

Explain overall reasoning

// psuedo code
class MessageForm extends React.Component {
onSubmit = (e) => {
// POST the new message
}
render() {
return (
<form onSubmit={this.onSubmit}>
// Removing Decorators
//
// Flow does not currently understand decorators. Also, removing the decorators
// sets us up to easily export things without data for testing.
// Current Pattern
@connect(mapStateToProps)
@withSavedPayments
export default class CheckoutButtons extends Component {
@johnthepink
johnthepink / example.js
Created November 15, 2016 17:07
Mocking Mixin Class Methods
const MockHeaderAction = (Component) => (
class MockHeaderAction extends React.Component {
constructor () {
super(...arguments);
this.headerAction = jest.fn();
}
render() {
return <Component { ...this.props } { ...this.state } />
}
}
import { shallow } from "enzyme";
import { shallowToJson } from "enzyme-to-json";
import Layout from "../Layout";
const defaultProps = {
schedule: {
start: "2012-12-12",
details: [
{
amount: 2,

Drum Talk: Playing the Right Note

About Yourself

  • little about myself
  • little about yourself

Intro

It's not the notes you play, it's the notes you don't play. - Miles Davis

<item>
<title />
<description>
Fifty-nine passengers and four crew members safely evacuated a United Express flight after the engine burst into flames.&lt;div class="feedflare"&gt;
&lt;a href="http://rss.cnn.com/~ff/rss/cnn_travel?a=H995_4vxihE:2pGC83WfmKU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/rss/cnn_travel?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://rss.cnn.com/~ff/rss/cnn_travel?a=H995_4vxihE:2pGC83WfmKU:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/rss/cnn_travel?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://rss.cnn.com/~ff/rss/cnn_travel?a=H995_4vxihE:2pGC83WfmKU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/rss/cnn_travel?i=H995_4vxihE:2pGC83WfmKU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://rss.cnn.com/~ff/rss/cnn_travel?a=H995_4vxihE:2pGC83WfmKU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/rss/cnn_travel?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a
@johnthepink
johnthepink / colors.md
Last active April 11, 2019 04:49
Terminal Palette

Terminal Palette Colors

#3C4C55 #899BA6

#DF8C8C #F2C38F

#A8CE93 #A8CE93