Skip to content

Instantly share code, notes, and snippets.

View cjoelrun's full-sized avatar

Cameron Lopez cjoelrun

  • Software Consultant
  • San Antonio
View GitHub Profile
@cjoelrun
cjoelrun / es7-async-await.js
Created June 7, 2020 18:26 — forked from msmfsd/es7-async-await.js
Javascript fetch JSON with ES7 Async Await
// Async/Await requirements: Latest Chrome/FF browser or Babel: https://babeljs.io/docs/plugins/transform-async-to-generator/
// Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill: https://github.com/github/fetch
// async function
async function fetchAsync () {
// await response of fetch call
let response = await fetch('https://api.github.com');
// only proceed once promise is resolved
let data = await response.json();
// only proceed once second promise is resolved

Keybase proof

I hereby claim:

  • I am cjoelrun on github.
  • I am cjoelrun (https://keybase.io/cjoelrun) on keybase.
  • I have a public key ASD4nvFws18KhIKs9NMrtD7dPgz36CjTrvSEsoPr00Cm8go

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am cjoelrun on github.
* I am cjoelrun (https://keybase.io/cjoelrun) on keybase.
* I have a public key ASD4nvFws18KhIKs9NMrtD7dPgz36CjTrvSEsoPr00Cm8go
To claim this, I am signing this object:
(monster)Camerons-MacBook-Pro% nova list
+--------------------------------------+---------------------------+--------+------------+-------------+--------------------------------------------------------------------------------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+---------------------------+--------+------------+-------------+--------------------------------------------------------------------------------------------------------------------------------+
| 553f0335-3ff2-43bf-a253-89beaffa2f3a | julian-chef-server | ACTIVE | - | Running | public=162.242.246.41, 2001:4802:7802:0102:c0ab:6103:ff20:45f6; private=10.208.169.108 |
| 7e78e0c9-d156-4f79-b768-d5b94a68e063 | sdk-je
CFLAGS=-Qunused-arguments
CPPFLAGS=-Qunused-arguments
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future