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
git config --global alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit" | |
git config --global alias.lola "log --graph --decorate --pretty=format:\"%C(yellow)%h %Cred%cr %Cblue(%an)%C(white)%d%Creset %s\" --abbrev-commit --all" |
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
.autolayout { | |
display: flex; | |
flex-direction: row; | |
flex-shrink: 0; | |
justify-content: flex-start; | |
align-items: flex-start; | |
} | |
/* Horizontal */ |
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
/* | |
Usage: | |
* Paste this into your dev tools console (or even better as a snippet) | |
* It will parse the page and find all the things that create a new stacking context | |
and dump some info about them to the console. It will also outline them on the page. | |
* This is pretty rough and probably misses heaps of bugs and edge cases. | |
*/ | |
function highlight(el) { |
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
module.exports = config => { | |
return { | |
dir: { | |
input: 'src', | |
output: 'dist' | |
} | |
}; | |
}; |
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
# Misc | |
*.log | |
npm-debug.* | |
*.scssc | |
*.swp | |
.DS_Store | |
Thumbs.db | |
.sass-cache | |
.env | |
.cache |
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
const { series, src, dest } = require('gulp'); | |
const fs = require('fs'); | |
const del = require('del'); | |
const json = require('json-update'); | |
var rename = require("gulp-rename"); | |
var cp = require('child_process'); | |
const package = require('./package.json'); | |
const deployment = require('./deployment.json'); |
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
/** | |
* Stupid simple BEM utility for class names. Useful for creating className strings in simple components | |
* @param {string} block - Block name | |
* @param {string} [element] - Element name | |
* @param {string} [modifier] - modifier name | |
* @return {string} A BEM string, | |
* | |
* @example | |
* bem('button', 'icon', 'red'); | |
* // returns 'button button--icon button--icon--red' |
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
/** | |
* Extracts subdomain from hostname. Works with localhost, but not with full url with ports. | |
* @example | |
* getSubdomain(location.hostname); //www.google.com | |
* // returns 'www' | |
* @example | |
* getSubdomain(location.hostname); //localhost | |
* // returns 'localhost' | |
**/ |
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
/** | |
* Recursively find parents until matching tag has been found. | |
* Useful when observing clicks on elements with child elements, but you need to use data- attributes from parent. | |
* @param {HTMLElement} element - Element to find parent from. | |
* @param {string} tag - Parent tag to find. Eg. 'DIV' or 'H1' | |
**/ | |
function findParentTag(element, tag) { | |
const tagName = tag.toUpperCase(); | |
if (element.tagName === tagName) return element; |
NewerOlder