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
| // By @coderitual | |
| // https://twitter.com/coderitual/status/1112297299307384833 | |
| // Remove any duplicates from an array of primitives. | |
| const unique = [...new Set(arr)] | |
| // Sleep in async functions. Use: await sleep(2000). | |
| const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms))); | |
| // Type this in your code to break chrome debugger in that line. |
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
| // .storybook/addons.js | |
| import '@storybook/addon-knobs/register' | |
| import '@storybook/addon-a11y/register' | |
| import '@storybook/addon-actions/register' | |
| import '@storybook/addon-links/register' |
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
| git config core.ignorecase false |
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
| - webpack.config.js | |
| - postcss.config.js | |
| - config.js | |
| - addons.js |
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
| -/(?=.*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
| // GET PARENT | |
| // getParent(document.querySelector('.element'), '.parent-element') | |
| // return: element | |
| function getParent(elem, selector) { | |
| var parent = elem | |
| while (parent != document.body) { | |
| if (parent.matches(selector)) { | |
| return parent | |
| } |
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
| var Categories = {}; | |
| fetch('http://api.bigchefs.protelworks.com/menu/items/').then(function (response) { | |
| return response.json(); | |
| }).then(function (data) { | |
| console.log(data); | |
| data.menu_items.forEach(function (obj) { | |
| if (!_.has(Categories, obj.categories)) { | |
| _.set(Categories, obj.categories.join(".") + '.items', []); | |
| } |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| <style id="jsbin-css"> | |
| * { | |
| margin: 0; | |
| padding: 0; |
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
| Type Foundry Log | |
| Thought it might be nice to share or maintain a log or list of foundries. | |
| http://www.felicianotypefoundry.com/ | |
| http://www.fontsmith.com/fonts/ | |
| http://sudtipos.com/home | |
| http://www.type-together.com/ | |
| http://fontfabric.com/ | |
| http://www.letterheadfonts.com/ | |
| http://thedaleguild.com/ |
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
| var citiesRef = db.collection("cities"); | |
| var query = citiesRef.where("capital", "==", true); | |
| citiesRef.where("state", "==", "CA") | |
| citiesRef.where("population", "<", 100000) | |
| citiesRef.where("name", ">=", "San Francisco") | |
| citiesRef | |
| .where("state", "==", "CA") |