Skip to content

Instantly share code, notes, and snippets.

View bryanrsmith's full-sized avatar
🐐

Bryan Smith bryanrsmith

🐐
View GitHub Profile
@bryanrsmith
bryanrsmith / userstyle.css
Last active November 8, 2018 07:05 — forked from jessedobbelaere/userstyle.css
Flowdock Classic (<May 2017) theme
/**
* On 2017-05-30, Flowdock did some UI changes. This is an attempt to ease the pain.
* For the desktop app: Save this file as userstyle.css and put it inside ~/Library/Application Support/Flowdock/, then hit CMD+R to reload Flowdock.
* For flowdock.com: Install the stylebot extension and copy this CSS into the config for flowdock.com.
*
* Forked from:
* https://gist.github.com/jessedobbelaere/95c02699b2e0acd35762d204797b74f9
* @author Jesse Dobbelaere (@JesseDobbelaere)
*/
@bryanrsmith
bryanrsmith / _error.js
Last active June 25, 2021 15:32
Next.js custom error handler that doesn't display for errors encountered on initial client render
import React, { PropTypes } from 'react';
import Head from 'next/head';
import Router from 'next/router';
// Script errors occuring during initial client render can cause the server-rendered
// content to be hidden by an error page. Track router events to determine if the
// error being handled happened during initial render, and throw within
// getInitialProps to allow the server-rendered content to remain visible.
const isClient = typeof window !== 'undefined';
let isInitialClientRender = isClient;
@bryanrsmith
bryanrsmith / app.html
Created January 13, 2017 04:57 — forked from jdanyow/app.html
Aurelia Gist
<template>
<h1>${message}</h1>
</template>
@bryanrsmith
bryanrsmith / .eslintrc
Last active June 17, 2018 18:21
eslint config
{
"parser": "babel-eslint",
"env": {
"browser": true
},
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
@bryanrsmith
bryanrsmith / README.md
Last active April 8, 2019 21:03
aurelia-fetch-client documentation

An HTTP client based on the Fetch API. The project aims to embrace and expose the new Fetch API, while providing features important in web applications: default configuration of request parameters, interceptors, and centralized request tracking.

Bring Your Own Polyfill

This library relies on the Fetch API, which is not yet supported by all popular browsers. This library does not include a polyfill for Fetch. If you need to support browsers that haven't implemented Fetch, you will need to install a polyfill like GitHub's Fetch polyfill

@bryanrsmith
bryanrsmith / fetch-client.js
Last active April 12, 2020 16:21
A thin wrapper library around the fetch API to provide application-wide HTTP client configuration
export class HttpClient {
constructor(defaults) {
this.defaults = defaults;
this.interceptors = [];
this.activeRequestCount = 0;
this.isRequesting = false;
}
addInterceptor(interceptor) {
this.interceptors.push(interceptor);