View local branches
git branch
- the one with the
*
next to it is your currentHEAD
View remote branches
git branch -r
- repositories that are hosted on the repo will be preceded with
origin/
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
// hide HMR and GET | |
/^((?!HMR|GET).)*$/ | |
// Hide Warnings | |
/^((?!warning).)*$/ | |
// Hide all | |
/^((?!warning|HMR|GET).)*$/ | |
// wrap regex in / / if using Canary |
const url = require('url'); | |
const crypto = require('crypto'); | |
const config = { | |
secret: 'YOUR_SECRET', | |
clientId: 'CLIENT_ID' | |
} | |
const generateSignature = (address) => { | |
const request = url.parse(address); |
/** | |
<p>Given a collection (array of objects) and a value, find the index of the closest matching value (rounding UP).</p> | |
<br/> | |
<strong.=>example:</strong> | |
<pre> | |
var arr = [{ val: 0}, { val: 25}, { val: 50}, { val: 75}, { val: 100}]; | |
Given: 0 // given value to find | |
Expected: 0 //index |
git branch
*
next to it is your current HEAD
git branch -r
origin/
var counter = { x: 0 }; | |
var p = []; | |
function count(c) { | |
var time = Math.floor(Math.random() * 1000); | |
return new Promise(function (resolve) { | |
setTimeout(function () { | |
var x = c.x++; | |
console.log(x + ':' + time); | |
resolve(x + ':' + time); |
var data = { | |
name: 'james', | |
age: 30 | |
}; | |
function doSomething(){ | |
console.log('- doSomething'); | |
return (...args) => { |
var master = { | |
data: { | |
values: [1, 2, 3], | |
labels: ["one", "two", "three"], | |
food: { | |
name: "pizza" | |
}, | |
groups: [ | |
{ | |
brand: 'zillow', |
var deDupeNonNull = function(data, key){ | |
var used = []; | |
return _.reduce(data, function(cur, data){ | |
if(!!data[key] && !_.includes(used, data[key])){ | |
used.push(data[key]); | |
cur.push(data); | |
} | |
else if(!data[key]) { | |
cur.push(data); |
'use strict'; | |
var filter = require('lodash/collection/filter'); | |
var typeRegexes = { | |
/*eslint-disable */ | |
email: /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i |