This file contains hidden or 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
/** | |
* Convert an imageURL to a | |
* base64 dataURL via canvas | |
* | |
* @param {String} url | |
* @param {Object} options | |
* @param {String} options.outputFormat [outputFormat='image/png'] | |
* @param {Float} options.quality [quality=1.0] | |
* @return {Promise} | |
* @docs https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement#Methods |
This file contains hidden or 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
(function monkeyPatchJQueryAutocomplete($) { | |
/** | |
* Proxies a private | |
* prototype method to the | |
* options Object | |
* | |
* @param {Object} obj | |
* @param {String} funcName | |
*/ |
This file contains hidden or 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
/** | |
* Checks if an element is editable. | |
* Does this by checking parent | |
* elements as well. | |
* | |
* @param {Node} targetNode | |
* @return {Boolean} | |
*/ | |
function isContentEditable(targetNode){ | |
while(targetNode.parentElement){ |
This file contains hidden or 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
#!/bin/bash -e | |
# Update System | |
echo 'Update System Packages' | |
apt-get update | |
# Install git | |
echo 'Installing git' | |
apt-get install git -y |
This file contains hidden or 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
(function($) { | |
function OrderedNode(element) { | |
this.$element = $(element); | |
this.maxViewport = parseInt(this.$element.data(this.maxViewportName)); | |
this.saveOldState(); | |
this.decide(); | |
if (this.maxViewport) { | |
// Todo: Throttle |
This file contains hidden or 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
/** | |
* Converts an image to a dataURL | |
* @param {String} src The src of the image | |
* @param {Function} callback | |
* @param {String} outputFormat [outputFormat='image/png'] | |
* @url https://gist.github.com/HaNdTriX/7704632/ | |
* @docs https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement#Methods | |
* @author HaNdTriX | |
* @example | |
* |
This file contains hidden or 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
/** | |
* @fileoverview Externs for Zepto v1.0 | |
* | |
* Note that some functions use different return types depending on the number | |
* of parameters passed in. In these cases, you may need to annotate the type | |
* of the result in your code, so the JSCompiler understands which type you're | |
* expecting. For example: | |
* <code>var elt = /** @type {Element} * / (foo.get(0));</code> | |
* | |
* @see http://zeptojs.com/ |
NewerOlder