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
Enter; | |
yarn upgrade my-package@^ | |
To get an interactive version picker |
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
class TickTimer = { | |
constructor() { | |
this.tickMs = 6000 | |
this.sound = new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1fhzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3Vmz+Zt//+mm3Wm3Q576v////+32///5/EOgAAADVghQAAAAA//uQZAUAB1WI0PZugAAAAAoQwAAAEk3nRd2qAAAAACiDgAAAAAAABCqEEQRLCgwpBGMlJkIz8jKhGvj4k6jzRnqasNKIeoh5gI7BJaC1A1AoNBjJgbyApVS4IDlZgDU5WUAxEKDNmmALHzZp0Fkz1FMTmGFl1FMEyodIavcCAUHDWrKAIA4aa2oCgILEBupZgHvAhEBcZ6joQBxS76AgccrFlczBvKLC0QI2cBoCFvfTDAo7eoOQInqDPBtvrDEZBNYN5xwNwxQRfw8ZQ5wQVLvO8OYU+mHvFLlDh05Mdg7BT6YrRPpCBznMB2r//xKJjyyOh+cImr2/4doscwD6neZjuZR4AgAABYAAA |
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
setInterval( | |
function() { | |
try { | |
var page = document.getElementById('page') | |
page.className = page.className.replace("dgd_blur", ''); | |
document.querySelector(".dgd_overlay").remove(); | |
} catch(ex) { | |
} | |
}, |
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
<div class="cart__options"> | |
{% for i in (0..2) %} | |
{% assign variant_option_key = i | plus: 1 | prepend: "option" %} | |
{% assign variant_value = item.variant[variant_option_key] %} | |
{% if variant_value %} | |
<div class="cart__option"> | |
{{ item.product.options[i] }}: {{ variant_value }} | |
</div> | |
{% endif %} | |
{% endfor %} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
def pull_down_remote_db(): | |
""" Export database and files. | |
""" | |
local_db_dump_path = os.path.join(PROJECT_ROOT, 'remote_db_dump/auto_db_dump.sql') | |
with settings(sudo_user='postgres'): | |
with cd('/var/lib/postgresql'): | |
run('pwd') | |
print("Dumping database on remote..") | |
sudo('pg_dump db_krownlab > auto_db_dump.sql') |
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 fitPhotoTargetSelector = name + " .fittingbox-fitphoto-target"; | |
window.fitPhoto = FitPhoto.create(fitPhotoTargetSelector, { | |
width: 327, | |
glassID: glassID, | |
localeChain: 'en_US' | |
}); | |
// handle change sku | |
$actionContainer.find('.fittingbox-sku').unbind('click').click(function() { | |
var sku = $(this).data('sku'); |
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
# custom validation logic | |
$.validator.addMethod 'validateShipState', (value, element) -> | |
# if the element contains an arbitrary piece of data called `custom-validator-exception`, don't allow form to validate. | |
if $(element).data('custom-validator-exception') | |
return false | |
return true | |
, -> | |
return $("[name=s_state]").data('custom-validator-exception') |
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
<link href="/static/css/select2.css" type="text/css" media="screen" rel="stylesheet" /> | |
<script type="text/javascript" src="/static/js/select2.js"></script> | |
<script type="text/javascript"> | |
$(function () { | |
select2Options = { | |
'width': 'resolve', | |
} | |
$("#content-main select:not(.select2-offscreen)").select2(select2Options); |
NewerOlder