This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"parser": "babel-eslint", | |
"extends": "airbnb", | |
"plugins": [ | |
"babel" | |
], | |
"env": { | |
"browser": true, | |
"jest": true, | |
"node": true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--grid-color: rgba(100, 180, 120, .2) | |
} | |
html { | |
position:relative; | |
} | |
html:after { | |
position: absolute; | |
width: auto; | |
height: auto; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @description promisified optimisation of image via canvas API | |
* | |
* @param {File} file - a file of an image which should be transformed | |
* @param {integer} destHeight - a desired height of an output image Blob|DataURL | |
* @param {integer} quality - a desired level of compression of an output image Blob|DataURL | |
* @param {string} mimeType - mimeType of of an output image Blob|DataURL | |
* @param {string} to - part of canvas conversion method name (can be 'DataURL' or 'Blob' as a `Canvas.toDataURL()` or `Canvas.toBlob()`) | |
* | |
* @return {Promise} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getFnName(fn) { | |
var f = typeof fn == 'function'; | |
var s = f && ((fn.name && ['', fn.name]) || fn.toString().match(/function ([^\(]+)/)); | |
return (!f && 'not a function') || (s && s[1] || 'anonymous'); | |
} | |
console.log(getFnName(String)); // 'String' | |
console.log(getFnName(function test(){})); // 'test' | |
console.log(getFnName(function (){})); // 'anonymous' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
sourcemaps = require('gulp-sourcemaps'), | |
autoprefixer = require('gulp-autoprefixer'), | |
cssnano = require('gulp-cssnano'), | |
newer = require('gulp-newer'), | |
concat = require('gulp-concat'), | |
plumber = require('gulp-plumber'), | |
notify = require('gulp-notify'), | |
bs = require('browser-sync'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
# go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |