- Text Content Generator - http://www.lipsum.com
- Favicon Generator - http://tools.dynamicdrive.com/favicon
- Data Generator - https://mockaroo.com/
- Mobile Mockup Generator - https://mockuphone.com
- Logo Generator - https://www.logaster.com
- UUID Generator - https://www.uuidgenerator.net/
- Hash Generator - https://passwordsgenerator.net/sha256-hash-generator/
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
| #!/bin/sh node | |
| const fs = require("fs"); | |
| const path = require("path"); | |
| const parseArgs = require("minimist"); | |
| const argv = parseArgs(process.argv.slice(2)); | |
| // readDirectory gets the files and folders of a directory, excluding an unwanted list | |
| function readDirectory(directory, excludes) { | |
| console.log(`Performing operations in ${directory}`); |
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
| /** | |
| * A collection of helper prototype for everyday DOM traversal, manipulation, | |
| * and event binding. Sort of a minimalist jQuery, mainly for demonstration | |
| * purposes. MIT @ m3g4p0p | |
| */ | |
| window.$ = (function (undefined) { | |
| /** | |
| * Duration constants | |
| * @type {Object} |
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 makeObjectsOfArrayUnique = (arr, property) => { | |
| // Array to keep unique items | |
| const result = []; | |
| // We're using the Map's in-built ability to filter duplicates | |
| const map = new Map(); | |
| for (const element of arr) { | |
| if (!map.has(element[property])) { | |
| map.set(element[property], true); | |
| result.push(element); |
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 el(tag, attrs, children = []) { | |
| const element = document.createElement(tag); | |
| if (attrs) { | |
| Object.entries(attrs).forEach([attr, value] => { | |
| element.setAttribute(attr, value); | |
| }); | |
| } | |
| if (typeof children === 'string') { |
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
| let cards = document.querySelectorAll(".js-carousel .card"); | |
| cards = Array.from(cards); | |
| // Set slides in carousel to height of highest card | |
| const setEqualHeight = () => { | |
| let cardHeights = []; | |
| cards.forEach(card => { | |
| let height = window.getComputedStyle(card).height; | |
| height = Number(height.slice(0, -2)); |
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 orderObjectsByRanking(objectArr) { | |
| objectArr.sort((a,b) => { | |
| if(a.ranking > b.ranking) return 1; | |
| if(a.ranking < b.ranking) return -1; | |
| return 0; | |
| }); | |
| } |