Skip to content

Instantly share code, notes, and snippets.

View msell's full-sized avatar

Matt Sell msell

View GitHub Profile
<style id="jsbin-css">
body {
display: flex;
flex-direction: column;
}
pre {
flex: 1;
background-color: #eee;
}
</style>
@msell
msell / flow propTypes.md
Created March 18, 2017 19:23
flow types

Before (using react prop types)

import React, { PropTypes } from 'react';
import styled, { css } from 'styled-components';

const styles = css`
  text-align: left;
  padding: 0.75em;
`;
@msell
msell / bb8-hub.js
Created March 13, 2017 03:40 — forked from mobyjames/bb8-hub.js
BB-8 Internet of Things Hub
var sphero = require('sphero-pwn'),
exec = require('exec'),
macros = require('sphero-pwn-macros'),
keypress = require("keypress");
var orb = null,
id = 'ble://##:##:##:##:##:##';
var awsIot = require('aws-iot-device-sdk');
@msell
msell / rxjs-firebase-demo.js
Created January 2, 2017 04:38 — forked from deltaepsilon/rxjs-firebase-demo.js
Demo RxJs integration with Firebase
var Rx = require('rxjs');
var firebase = require('firebase');
firebase.initializeApp({
"databaseURL": "https://quiver-two.firebaseio.com",
"serviceAccount": "./service-account.json"
});
var ref = firebase.database().ref('rxjs-demo');
Rx.Observable.fromPromise(ref.remove())
.map(function () {
@msell
msell / scores.json
Last active December 16, 2016 01:23
{
"_id": {
"$oid": "5844ca3c1bf21197c55cd8a8"
},
"season": 2016,
"seasonType": "REG",
"week": 13,
"gameScores": [
{
"gameSchedule": {
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@msell
msell / app.js
Created September 30, 2016 03:09
fetch api with rxjs Observable
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Rx from 'rx-lite';
class App extends Component {
componentWillMount() {
const getGames = week =>
fetch(`http://localhost:8080/nfl_games/2016/REG/${week}`)
.then(res => res.json())
@msell
msell / index.html
Created September 30, 2016 01:52 — forked from anonymous/index.html
Weather Monitoring in RxJS RxJS // source http://jsbin.com/veheje
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="RxJS">
<meta charset="UTF-8">
<title>Weather Monitoring in RxJS</title>
<style>
#form {
margin-bottom: 20px;
}
javascript: (function () {
var jsCode = document.createElement('script');
jsCode.setAttribute('src', 'https://cdn.rawgit.com/msell/5142b6748b251eff6994ad3b94cd8684/raw/485600bca458207988b7487431b24d26326c11da/dnm.js');
document.body.appendChild(jsCode);
}());