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",
View README.md

Abortable Fetch helper

Usage

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
View HOWTO.md

Installing Powerline fonts on Windows 10

Steps

  1. Download and extract zip from https://github.com/powerline/fonts
  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
<!--
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
View profiling_data.md

Profiling of lazy-imports vs importHref

Setup

System Specs

  • CPU: Intel Core i5
  • Memory: 16Gb
  • OS: Windows 10
  • Polymer CLI: 1.6.0
View polymer-upgrade-cheatsheet.md

Upgrade Cheatsheet

This is a simplified version of https://www.polymer-project.org/2.0/docs/upgrade. 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
0499c6fe28b49b1a02276ce841b8d838b31e5900d7eb342c7c6ae05df8c783383d570ed887a071d40e5ecd9f80161f831e4fd2c7b62fe320eb8456aea0538e8d1b;admwx7