Skip to content

Instantly share code, notes, and snippets.

View tayiorbeii's full-sized avatar

Taylor Bell tayiorbeii

View GitHub Profile
@johanneslumpe
johanneslumpe / 0_example.js
Last active November 3, 2015 18:23 — forked from tappleby/0_example.js
redux request middleware using superagent and es6 promises.
import { createStore, applyMiddleware, compose } from 'redux';
import request from 'superagent-es6-promise';
import thunkMiddlware from 'redux-thunk';
import promiseMiddleware from 'redux-promise';
import logMiddleware from './middleware/log';
import requestMiddleware from './middleware/request';
// Create request middleware with our execute logic, return promise.
const executeRequestMiddleware = requestMiddleware((req, getState) => {
const { session: { token } } = getState();
@enu-kuro
enu-kuro / ParseReact-written-in-ES6.js
Last active November 23, 2015 19:48
ParseReact written in ES6.
import React from 'react/addons';
import QuestionListItem from './QuestionListItem.react';
import MessageComposer from './MessageComposer.react';
import { Parse } from 'parse';
import ParseReact from 'parse-react';
import ReactMixin from 'react-mixin';
import ActionCreators from '../../actions/ActionCreators';
import RouterContainer from '../../services/RouterContainer';
import QuestionStore from '../../stores/QuestionStore';
@hansott
hansott / toString.swift
Last active March 18, 2019 02:46
Swift toString() method
// Searching for a toString() method in Swift? Use the printable protocol!
// Implement Printable protocol and create a description variable
// https://developer.apple.com/library/ios/documentation/General/Reference/SwiftStandardLibraryReference/Printable.html
class Person : Printable {
var name : String!
init(name : String) {
self.name = name
}