Skip to content

Instantly share code, notes, and snippets.

export EDITOR=/usr/local/bin/code
export PATH=/usr/local/git/bin:$PATH
# ulimit -n 65536 65536
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# PS1='\[\e[01;37m\][\u@\h \w] \t $\[\e[0m\] '
# cool prompt
function findByPropertyValue(object, propName, propValue) {
if (object[propName] === propValue) {
return object;
}
var result, property;
for (property in object) {
if (
object.hasOwnProperty(property) &&
typeof object[property] === "object" &&
object[property] !== null
function wrapChildrenInSets(parentNode = null, setsOf = 2) {
if (!parentNode) return;
const children = [...parentNode.children];
const divSets = [];
const divsPerSet = setsOf;
const numSets = Math.ceil(children.length / divsPerSet);
for (let index = 0; index < numSets; index++) {
.g {
/* Portrait */
background: #8e9eab; /* fallback for old browsers */
background: linear-gradient(to right, #eef2f3, #8e9eab); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}