This file contains 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
///////////// | |
// STRINGS // | |
///////////// | |
// https://mzl.la/2ZiPyGL - .split | |
// https://mzl.la/2Zh3XTQ - .repeat | |
// https://mzl.la/2ZjaT3c - .startsWith | |
// https://mzl.la/2ZeuLUW - .endsWith | |
// https://mzl.la/2ZfUxIk - .trim | |
// https://mzl.la/2Z9sBWG - .toUpperCase |
This file contains 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
<!doctype html> | |
<html class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
This file contains 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
/* | |
Relevant packages used: | |
----------------------- | |
"@babel/core": "^7.0.0-beta.40", | |
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.40", | |
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.40", | |
"@babel/preset-env": "^7.0.0-beta.40", | |
"@babel/preset-react": "^7.0.0-beta.40", | |
"babel-loader": "^8.0.0-beta.2", |
This file contains 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
/* | |
This file is a copy of what's generated when using the `create-new-app` package with the `-m` option. | |
`create-new-app` is the full-stack version of `create-react-app` but with options. | |
`create-new-app` - https://www.npmjs.com/package/create-new-app | |
*/ | |
require('dotenv').load(); // https://goo.gl/Cj8nKu | |
const { NODE_ENV } = process.env | |
const isProd = NODE_ENV === 'production'; | |
const path = require('path'); |
This file contains 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 avgColor(imageUrl) { | |
var canvas = document.createElement('canvas'); | |
var context = canvas.getContext && canvas.getContext('2d'); | |
var rgb = {r: 102, g: 102, b: 102}; // Set a base colour as a fallback for non-compliant browsers | |
var pixelInterval = 5; // Rather than inspect every single pixel in the image inspect every 5th pixel | |
var count = 0; | |
var i = -4; | |
var img = document.createElement('img'); | |
var data; | |
var length; |
This file contains 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 pseudo(el, css) { | |
var string = ''; | |
for(var i in css) { | |
string += i | |
+ ':' | |
+ css[i] | |
+ ';'; | |
} |