I hereby claim:
- I am htmelvis on github.
- I am edbmt (https://keybase.io/edbmt) on keybase.
- I have a public key ASDYH-eq0PAGeH2fznBggNYRrcFiYAUrhlka-Dp5IArytAo
To claim this, I am signing this object:
const isEqual = (a, b) => JSON.stringify(a) === JSON.stringify(b); | |
// examples | |
isEqual({ a: 1, b: 2 }, { a: 1, b: 2 }); // true | |
isEqual({ a: 1, b: 2 }, { a: 1, b: 3 }); // false | |
// works with arrays too | |
isEqual([1, 2, 3], [1, 2, 3]); // true | |
isEqual([1, 2, 3], [1, 2, 4]); // false |
const getParameters = (URL) => { | |
URL = JSON.parse('{"' + decodeURI(URL.split("?")[1]).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g, '":"') +'"}'); | |
return JSON.stringify(URL); | |
}; | |
getParameters(window.location) | |
// Result: { search : "easy", page : 3 } |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
{ | |
"name": "Example", | |
"version": "1.0.0", | |
"description": "This is an example of a complex app using Jest", | |
"main": "index.js", | |
"scripts": { | |
"start": "npm-run-all --parallel watch:server watch:build", | |
"watch:build": "webpack -d --watch --progress --colors", | |
"watch:server": "nodemon \"server/server.js\" --watch \"./server\"", | |
"test": "jest", |
function selectText(containerid) { | |
if (document.selection) { | |
var range = document.body.createTextRange(); | |
range.moveToElementText(document.getElementById(containerid)); | |
range.select(); | |
} else if (window.getSelection) { | |
var range = document.createRange(); | |
range.selectNode(document.getElementById(containerid)); | |
window.getSelection().addRange(range); | |
} |
{% if context == 'cart' or context == 'checkout' %} | |
<script type="text/javascript" charset="utf-8"> | |
(function (FC, $) { | |
//Set the text of the newsletter subscribe button | |
FC.json.config.lang.checkout_newsletter_subscribe = "Don’t get left out! Stay up to date on our latest products and promotions."; | |
//set the default checked method to checked on the checkbox for subscribe | |
FC.customFlatRates = {}; |
(function() { | |
var i = 0, | |
adArray = [13,14,15,16,17,18,19,110,111,112,113,114,115,116], | |
l = adArray.length; | |
(function iterator() { | |
console.log('Loop: ', i, ' Loop content: ', adArray[i]); | |
//update before evaluating the conditional | |
if (++i < l) { | |
setTimeout(iterator, 1500); |
# Check what server processes are currently running on a given port | |
function _checkForRunningServer(){ | |
echo "Currently checking port: $1" | |
lsof -wni tcp\:$1; | |
#would like to expand to pass arg to kill said server ps | |
} | |
#register the alias in your .bashrc or .zshrc | |
alias whatsup=_checkForRunningServer |