Skip to content

Instantly share code, notes, and snippets.

View deckarts's full-sized avatar

detlef deckarts

View GitHub Profile
// needs $ npm install node-fetch
// https://github.com/node-fetch/node-fetch
const fetch = require('node-fetch');
const getCovidStats = async() => {
console.log('\nCovid-19');
try {
const response = await fetch('https://covidtracking.com/api/us');
// Requires a Node environment
// Plus Axios https://github.com/axios/axios
'use strict'
const axios = require('axios');
// Get request json response data from source
function getUS() { return axios.get('https://covidtracking.com/api/us'); }
axios.all([getUS()])
@deckarts
deckarts / vim-productive-start.md
Last active March 4, 2020 00:57
A Productive Start with Vim

Next Level Vim

It is definitely worth the time it takes to learn text manipulation with the ubiquitous Vi(m) command line text editor. There is a visual version, but we're going to focus on the command line interpreter version. If you only know how to open a file and enter text, edit some text, and especially how to save edited files and exit the program you will be much better off for it.

Vim is readily available in nearly all modern Linux (or BSD) distributions at the terminal emulator shell command prompt. Once you've defined Vim as your default editor for your user shell, then you can navigate builtin utilities like $ man etc. using familiar Vim key bindings. We'll highlight how to do that with bash and zsh, now distributed by Apple on the Mac since Catalina.

Bash

# ~/.bashrc (or alternatively) ~/.bash_profile