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 keys = [ | |
'description', | |
'publishDate', | |
'keywords', | |
'author', | |
'og:site_name', | |
'og:title', | |
'og:url', | |
'og:description', | |
'og:type', |
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
var operators = ['+', '-', '*', '/']; | |
var string = '4 2 + 3 5 1 - * +'; | |
var funcs = { | |
'+': function (a, b) { | |
return b + a; | |
}, | |
'-': function (a, b) { | |
return b - a; |
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
#! /bin/bash | |
DIR="lib/client/images" | |
for filename in $DIR/*; do | |
FILE=${filename##*/}; | |
FOUND=`egrep -lr --include=*.{scss,jsx,js} "($FILE)" ./lib` | |
if [ "$FOUND" ] | |
then |
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
var div = document.getElementById('div'); | |
var observer = new MutationObserver(cb); | |
var config = { attributes: true, attributeOldValue: true, childList: true }; | |
// observe a target | |
observer.observe(div, config); | |
// perform some actions on that target which creates a record queue | |
var child = document.createElement('span'); | |
child.textContent = 'hi there!'; |
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
{isFirstItem && | |
this.doSomething() | |
vp.xs && this.doSomethingElse() | |
} | |
versus | |
{isFirstItem && this.doSomething()} | |
{isFirstItem && vp.xs && this.doSomethingElse()} |
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
// encode a particular part of a url | |
exports.encodeUrl = function encodeUrl(url, delimiter, keyword) { | |
var split = url.split(delimiter); | |
var container = []; | |
split.map(function (item) { | |
var replaced = keyword + '='; | |
if (item.indexOf(keyword) === 0) { | |
item = encodeURIComponent(item.split('=')[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
git br | grep -Ev 'develop|master' | xargs git br -D // brute force | |
git br | grep -Ev 'develop|master' | xargs git br -d // preserver unmerged branches |
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
Steps for creating a new branch, adding, commiting & pushing changes & creating a new pull request | |
NOTE: don't make commits directly to the develop branch. | |
step 1: git checkout develop - checks out the develop branch locally | |
step 2: git pull - gets you the latest updates for the repo | |
step 3: git checkout -b name bugfix/yaya-codes-awesome - create a new branch based off of develop |