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
<Gist url="username/id" file="filename.js"></Gist> |
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
Building wheels for collected packages: Pillow | |
Building wheel for Pillow (setup.py) ... error | |
ERROR: Command errored out with exit status 1: | |
command: /usr/local/opt/python@3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gg/yh3zn7bj3bxdcjbr_pxd83gr0000gn/T/pip-install-owbffvvx/pillow_10790c45ac71441483202a3eaecf6f14/setup.py'"'"'; __file__='"'"'/private/var/folders/gg/yh3zn7bj3bxdcjbr_pxd83gr0000gn/T/pip-install-owbffvvx/pillow_10790c45ac71441483202a3eaecf6f14/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/gg/yh3zn7bj3bxdcjbr_pxd83gr0000gn/T/pip-wheel-u1q9uo3c | |
cwd: /private/var/folders/gg/yh3zn7bj3bxdcjbr_pxd83gr0000gn/T/pip-install-owbffvvx/pillow_10790c45ac71441483202a3eaecf6f14/ | |
Complete output (174 lines): | |
/usr/local/lib/python3.9/site-packages/setuptools/dist.py:634: UserWarni |
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
<style> | |
h2 { | |
line-height: 1; | |
font-size: 25px!important; | |
} | |
h2 a { | |
display: block; | |
text-transform: capitalize; | |
color: #5AA2F1 !important; | |
font-size: 25px!important; |
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
localStorage = { | |
setItem: function(item, value) { | |
this.localStorage[item] = value; | |
}, | |
// ... | |
} |
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
getParam: function (name, url) { | |
if (!url) url = location.href; | |
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); | |
var regexS = "[\\?&]" + name + "=([^&#]*)", | |
regex = new RegExp(regexS), | |
results = regex.exec(url); | |
return results === null ? null : results[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
addOrUpdateUrlParam: function(uri, paramKey, paramVal) { | |
var regex = new RegExp("([?&])" + paramKey + "=[^&#]*", "i"); | |
if (regex.test(uri)) { | |
uri = uri.replace(regex, '$1' + paramKey + "=" + paramVal); | |
} else { | |
var separator = /\?/.test(uri) ? "&" : "?"; | |
uri = uri + separator + paramKey + "=" + paramVal; | |
} | |
if (history.pushState) { |
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
// HTML | |
<a href="#" class="lazyimage"> | |
<div class="placeholder" data-large="fullsize.jpg"> | |
<img src="small.jpg" class="img-small"> | |
<div style="padding-bottom: 39.47%;"></div> | |
<!-- % calculated from ratio eg. 450/1140px --> | |
</div> | |
</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
// Client side JS looks like this | |
model.get("packagesByName.jquery.url").then(function(response) { | |
// returns: git://github.com/jquery/jquery.git | |
document.write(response.json.packagesByName.jquery.url); | |
}); |