Skip to content

Instantly share code, notes, and snippets.

View colinrotherham's full-sized avatar

Colin Rotherham colinrotherham

View GitHub Profile
@colinrotherham
colinrotherham / _autocomplete.scss
Last active November 21, 2018 10:15
GOV.UK Accessible Autocomplete Sass
.autocomplete__wrapper {
position: relative;
}
.autocomplete__hint,
.autocomplete__input {
-webkit-appearance: none;
border: 2px solid;
border-radius: 0; /* Safari 10 on iOS adds implicit border rounding. */
box-sizing: border-box;
@colinrotherham
colinrotherham / console.log
Last active December 14, 2018 14:44
NPM: error cb() never called
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/Cellar/node@8/8.14.0/bin/node',
npm verb cli '/Users/colin/.npm-global/bin/npm',
npm verb cli 'install',
npm verb cli '--force',
npm verb cli '-ddd' ]
npm info using npm@6.6.0-next.0
npm info using node@v8.14.0
npm WARN using --force I sure hope you know what you are doing.
npm verb npm-session de4e7900b4b10bca
@colinrotherham
colinrotherham / console.log
Created December 14, 2018 14:56
NPM: npm ERR! ENFILE: file table overflow, scandir
This file has been truncated, but you can view the full file.
npx: installed 401 in 13.492s
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/Cellar/node@8/8.14.0/bin/node',
npm verb cli '/Users/colin/.npm/_npx/29779/bin/npmc',
npm verb cli 'install',
npm verb cli '--force',
npm verb cli '-ddd' ]
npm info using npm@6.5.0-canary.0
npm info using node@v8.14.0
npm notice CANARY npmc is experimental software. If you find an issue, please file it in the main npm repository, and call out that you were using npmc.
@colinrotherham
colinrotherham / save-to-pdf.mjs
Last active August 15, 2019 15:35
Save to PDF from Puppeteer
import puppeteer from 'puppeteer';
(async () => {
const browser = await puppeteer.launch();
// Open new page
const page = await browser.newPage();
// Go to website
await page.goto('http://www.red-phoenix-consulting.co.uk/', {
@colinrotherham
colinrotherham / Preferences.sublime-settings
Created September 18, 2019 08:05
Sublime preferences
{
"auto_find_in_selection": true,
"binary_file_patterns":
[
"*.min.js",
"*.min.css",
"*.sql",
"*.map",
"node_modules/",
"bower_components/"