Instantly share code, notes, and snippets.

View Chesterish-terminal.json
"magic": "nassh-prefs",
"version": 1,
"nassh": { "profile-ids": [] },
"hterm": {
"chesterish": {
"background-color": "rgba(41, 51, 64, 1)",
"cursor-blink": true,
"cursor-color": "rgba(44, 133, 247, 0.5)",
"font-family": "\"Fira Code\", \"DejaVu Sans Mono\", \"Noto Sans Mono\", \"Everson Mono\", FreeMono, Menlo, Terminal, monospace",

Abortable Fetch helper


import fetch, { ABORT_ERROR } from 'custom-fetch'

const abortableFetch = makeAbortable(fetch) // Defaults to `window.fetch` if no fetch is passed

const request = abortableFetch('/URL') // Returns an object with a `promise` and an `abort` property

Installing Powerline fonts on Windows 10


  1. Download and extract zip from
  2. Press Windows + x
  3. Press a (Selects PowerShell (Admin)
  4. Navigate to directory where fonts were extracted to (cd ${HOME}\Downloads\fonts-master\fonts-master)
  5. Set Execution policy Set-ExecutionPolicy Bypass
  6. Press y then Enter to accept
View _app.js
import App, { Container } from 'next/app'
import React from 'react'
class MyApp extends App {
render() {
const {
Component, pageProps
} = this.props
return (
View server.js
const express = require('express')
const bodyParser = require('body-parser')
const next = require('next')
const cookieParser = require('cookie-parser')
const routes = require('../universal/routes')
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
const routeHandler = routes.getRequestHandler(app)
View .babelrc
"env": {
"development": {
"presets": ["next/babel"]
"production": {
"presets": ["next/babel"]
"test": {
"presets": [
View lazy-imports-import.html
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
The complete set of authors may be found at
The complete set of contributors may be found at
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at

Profiling of lazy-imports vs importHref


System Specs

  • CPU: Intel Core i5
  • Memory: 16Gb
  • OS: Windows 10
  • Polymer CLI: 1.6.0

Upgrade Cheatsheet

This is a simplified version of It also lists what warnings and fixes are available for each upgrade task.

Shadow DOM template and styling

DOM Template

  • <dom-module> using is or name should be replaced to use id
    • Warns
    • Fixable: Except dom-modules that contain both name and is
View genesis_public_key