Skip to content

Instantly share code, notes, and snippets.

Avatar
🚪

Tim Dorr timdorr

🚪
View GitHub Profile
View flow.css
.feature-hero .feature-heading {
margin-bottom: 2rem;
font-size: 2.5rem;
color: #E8BD36;
text-shadow: 1px 1px #2d343a, 2px 2px #2d343a, 3px 3px #2d343a, 4px 4px #2d343a, 5px 5px #2d343a, 6px 6px #2d343a, 7px 7px #2d343a, 8px 8px #2d343a, 9px 9px #2d343a, 10px 10px #2d343a, 11px 11px #2d343a, 12px 12px #2d343a, 13px 13px #2d343a, 14px 14px #2d343a, 15px 15px #2d343a, 16px 16px #2d343a, 17px 17px #2d343a, 18px 18px #2d343a, 19px 19px #2d343a, 20px 20px #2d343a, 21px 21px #2d343a, 22px 22px #2d343a, 23px 23px #2d343a, 24px 24px #2d343a, 25px 25px #2d343a, 26px 26px #2d343a, 27px 27px #2d343a, 28px 28px #2d343a, 29px 29px #2d343a, 30px 30px #2d343a, 31px 31px #2d343a, 32px 32px #2d343a, 33px 33px #2d343a, 34px 34px #2d343a, 35px 35px #2d343a, 36px 36px #2d343a, 37px 37px #2d343a, 38px 38px #2d343a, 39px 39px #2d343a, 40px 40px #2d343a, 41px 41px #2d343a, 42px 42px #2d343a, 43px 43px #2d343a, 44px 44px #2d343a, 45px 45px #2d343a, 46px 46px #2d343a, 47px 47px #2d343a, 48px 48px #2d343a, 49px 49px #2
@timdorr
timdorr / token.js
Created Sep 13, 2017
As async memoized data fetching singleton
View token.js
const tokenPromise = new Promise(async resolve => {
const { token } = await (await fetch('/api/tokens', {
method: 'POST',
credentials: 'include'
})).json()
resolve(token)
})
export default tokenPromise
@timdorr
timdorr / ReloadPlugin.js
Created Aug 30, 2017
Webpack Chrome Extension Page Reloader Plugin
View ReloadPlugin.js
function ReloadPlugin() {}
ReloadPlugin.prototype.apply = compiler => {
ReloadPlugin.watching = false
compiler.plugin('watch-run', (p, cb) => {
ReloadPlugin.watching = true
cb()
})
@timdorr
timdorr / react-router.js
Created Jul 3, 2017
React Router + Webpack 2 (CJS modules)
View react-router.js
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.amd)
define(["react"], factory);
else if(typeof exports === 'object')
exports["ReactRouter"] = factory(require("react"));
else
root["ReactRouter"] = factory(root["React"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {
@timdorr
timdorr / react-router.js
Created Jul 3, 2017
React Router + Webpack 2 + BABEL_ENV=es (modules: false)
View react-router.js
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.amd)
define(["react"], factory);
else if(typeof exports === 'object')
exports["ReactRouter"] = factory(require("react"));
else
root["ReactRouter"] = factory(root["React"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {
@timdorr
timdorr / redux.js
Created Jun 17, 2017
Redux Rollup Bundle
View redux.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.Redux = global.Redux || {})));
}(this, (function (exports) { 'use strict';
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
/** Detect free variable `self`. */
View react-redux.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('redux')) :
typeof define === 'function' && define.amd ? define(['exports', 'react', 'redux'], factory) :
(factory((global.ReactRedux = global.ReactRedux || {}),global.React,global.Redux));
}(this, (function (exports,react,redux) { 'use strict';
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
View ConfirmButton.js
import React, { Component } from 'react'
class ConfirmButton extends Component {
state = {
sure: false
}
handleReallySure = event => {
event.preventDefault()
View ownerapi_endpoints.json
{
"AUTHENTICATE": {
"TYPE": "POST",
"URI": "oauth/token",
"AUTH": false
},
"REVOKE_AUTH_TOKEN": {
"TYPE": "POST",
"URI": "oauth/revoke",
"AUTH": true
@timdorr
timdorr / MainApplication.java
Created Feb 11, 2017
Tesla App is now React Native!
View MainApplication.java
package com.teslamotors.TeslaApp;
import android.app.Application;
import com.BaiduMaps.BaiduPackage;
import com.airbnb.android.react.maps.MapsPackage;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.i18n.reactnativei18n.ReactNativeI18n;