Skip to content

Instantly share code, notes, and snippets.

View vinzdef's full-sized avatar
🍋
][__( ͡~ ͜ʖ ͡°)__][

Vincent De Feo vinzdef

🍋
][__( ͡~ ͜ʖ ͡°)__][
View GitHub Profile
@kopiro
kopiro / README.md
Last active November 6, 2018 14:39
Extract from a JS object with a specific pattern

extractWithPattern

Extract from a JS object with a specific pattern

let msg = [
	{ payload: { errors: { unknown_language: 'hello' } } },
	{ payload: { errors: { number: 1 } } },
	{ randomstuff: 42 }
];
@shospodarets
shospodarets / Chrome headless Puppeteer- capture DOM element screenshot using
Last active July 29, 2024 05:58
Chrome headless Puppeteer- capture DOM element screenshot using
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'});
@pburtchaell
pburtchaell / styles.css
Last active February 25, 2024 12:24
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/