I hereby claim:
- I am emenoh on github.
- I am emenoh (https://keybase.io/emenoh) on keybase.
- I have a public key whose fingerprint is 0237 A167 4E58 8840 9991 4AFA A97B 8CF6 E4FF A71B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
"use strict"; | |
const Nightmare = require('nightmare'); | |
const url = "http://www.apple.com"; | |
//just an example | |
const path = "./testfile.png"; | |
//we'll save the screenshot in the same directory | |
const userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10A5376e"; | |
//make sure we load the mobile version |
// Promise.all is good for executing many promises at once | |
Promise.all([ | |
promise1, | |
promise2 | |
]); | |
// Promise.resolve is good for wrapping synchronous code | |
Promise.resolve().then(function () { | |
if (somethingIsNotRight()) { | |
throw new Error("I will be rejected asynchronously!"); |
p { background: #FFCCCC }; |