Skip to content

Instantly share code, notes, and snippets.

@nicodevs
Created August 24, 2020 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicodevs/b970d4a689e7f545d8dd7bf3ce022dd0 to your computer and use it in GitHub Desktop.
Save nicodevs/b970d4a689e7f545d8dd7bf3ce022dd0 to your computer and use it in GitHub Desktop.
Some cool article title

A nice title

The first section.

In this article we will learn:

  • Foo
  • Bar
  • Baz

This is the first code block:

import get from 'lodash/get'
import Vue from 'vue'
import VueSVGIcon from 'vue-svgicon'
import Gravatar from 'vue-gravatar'
import { vueWindowSizeMixin } from 'vue-window-size'
import inRange from 'lodash/inRange'

This is a second code block:

const log = (response) => {
  if (!enabled) return false
  const { config, status, data } = response
  const { url, method, params, headers, data: payload } = config
  let color = colors.green
  if (status >= 400) color = colors.red
  if (status >= 200 && status < 300) color = colors.green
  const timestamp = new Date().getTime()
  const query = method === 'get' ? ['?', queryString.stringify(params)].join('') : ''
  console.log(`${color}%s\x1B[0m`, `[${timestamp}] ${status} ~ ${method.toUpperCase()} ${url}${query}`)
  console.log({ headers, params: method === 'get' ? params : payload, response: JSON.stringify(data) })
}

This is the end of the section.


This is another section

With more content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment