Skip to content

Instantly share code, notes, and snippets.

@emenoh
emenoh / fiddle.css
Last active August 29, 2015 13:56
JSFiddle Example
p { background: #FFCCCC };
@emenoh
emenoh / protips.js
Last active August 29, 2015 14:21 — forked from nolanlawson/protips.js
// 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!");
@emenoh
emenoh / NightmareEmulatorTest
Last active December 24, 2018 08:35
NightmareJS screenshots using device emulator
"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

Keybase proof

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: