Just playing around. It won't be bulletproof, but enough to do some basics.
A Pen by Aaron Barker on CodePen.
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
// Adjustments particular to this page to ensure we hit desktop breakpoint. | |
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1}); | |
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'}); |
function waitForElement(selector) { | |
return new Promise(function(resolve, reject) { | |
var element = document.querySelector(selector); | |
if(element) { | |
resolve(element); | |
return; | |
} | |
var observer = new MutationObserver(function(mutations) { |
// 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 |
Just playing around. It won't be bulletproof, but enough to do some basics.
A Pen by Aaron Barker on CodePen.
/** | |
* Using Operator Mono in Atom | |
* | |
* 1. Open up Atom Preferences. | |
* 2. Click the “Open Config Folder” button. | |
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up. | |
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden! | |
* 5. Tweak away. | |
* | |
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png): |
void function() { "use strict" | |
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WIP DO NOT USE WIP !!!!!!!!!!!!!!!!!!!!! | |
DO NOT USE THIS YET. | |
USE THE 2016 VERSION BELOW PLEASE. | |
WWWWWWWW WWWWWWWWIIIIIIIIIIPPPPPPPPPPPPPPPPP | |
W::::::W W::::::WI::::::::IP::::::::::::::::P | |
W::::::W W::::::WI::::::::IP::::::PPPPPP:::::P |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
} | |
NodeList.prototype.__proto__ = Array.prototype; |
Hello,
Many times, we see smaller sized droplets run out of memory due to the number of processes that are running. This can cause slow connections, services to crash and overall unpredictable behavior.
Potential solutions are:
Upsize to a larger server. We recommend at least a 1GB droplet for any server utilizing a MySQL database.
Enable swap (search for 'swap' in our articles https://digitalocean.com/community)