Skip to content

Instantly share code, notes, and snippets.

James Hatfield emenoh

Block or report user

Report or block emenoh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am emenoh on github.
  • I am 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:

emenoh / NightmareEmulatorTest
Last active Dec 24, 2018
NightmareJS screenshots using device emulator
View NightmareEmulatorTest
"use strict";
const Nightmare = require('nightmare');
const url = "";
//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
View protips.js
// Promise.all is good for executing many promises at once
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
emenoh / fiddle.css
Last active Aug 29, 2015
JSFiddle Example
View fiddle.css
p { background: #FFCCCC };
You can’t perform that action at this time.