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 Rx from 'rxjs'; | |
import axios from 'axios'; | |
const url = 'https://api.github.com/users/SeanPlusPlus' | |
const requestStream = Rx.Observable.of(url); | |
const responseStream = requestStream | |
.flatMap(requestUrl => | |
Rx.Observable.fromPromise(axios.get(requestUrl)) | |
); | |
responseStream.subscribe(response => { |
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
{ | |
"name": "startingPoint", | |
"version": "1.0.0", | |
"main": "app.js", | |
"license": "MIT", | |
"scripts": { | |
"start": "nodemon app.js --exec babel-node --presets es2015,stage-2" | |
}, | |
"dependencies": { | |
"nodemon": "^1.11.0" |
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 os | |
import smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
def send_email(message, recipient, subject): | |
# verify we have the creds | |
password = os.environ.get('EMAIL_PW', None) |
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
def auth_required(f): | |
@wraps(f) | |
def decorated_function(*args, **kwargs): | |
user_info = {} | |
if ENV == 'dev': | |
user_info["login"] = DEV_LOGIN | |
user_info['is_admin'] = True | |
else: # in prod |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content="response received"> | |
<meta name="author" content="stoked"> | |
<title>Response Recieved</title> | |
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> |
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 React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
const MY_ARR = [ | |
{ | |
name: 'foo', | |
}, | |
{ | |
name: 'bar', |
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
{ | |
'.editor:not(.mini)': { | |
'ctrl-b |': 'pane:split-right', | |
'ctrl-b _': 'pane:split-down', | |
'ctrl-h': 'window:focus-pane-on-left', | |
'ctrl-l': 'window:focus-pane-on-right', | |
'ctrl-j': 'window:focus-pane-below', | |
'ctrl-k': 'window:focus-pane-above', | |
}, | |
'atom-workspace': |
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 React from 'react'; | |
import { Bar as BarChart } from 'react-chartjs'; | |
class HelloChart extends React.Component { | |
constructor() { | |
super(); | |
const data = { | |
labels: ["January", "February", "March", "April", "May", "June", "July"], | |
datasets: [{ | |
label: "My First dataset", |
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
'use strict'; | |
// <p ng-bind-html="mytext | linkify | trustHTML"></p> | |
angular.module('myApp.filters', []). | |
filter('trustHTML', ['$sce', function ($sce) { | |
return function (text) { | |
return $sce.trustAsHtml(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
a,200;202;205 | |
b,302;60;3100 | |
c,50;200 |