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
VALOR COERCIÓN | |
------- --------- | |
false false | |
0 false | |
“” false | |
NaN false | |
null false | |
undefined false |
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
(function ($) { | |
// Reverses the array of matched elements | |
$.fn.reverse = Array.prototype.reverse; | |
/** | |
* Centers an element relative to another. | |
* @signature: $(selector).center(options) | |
* @param {Object} options: | |
* Defines the options with the following properties: |
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
#!/bin/bash | |
# To create in [.babun/]cygwin/usr/local/bin/subl with chmod +x | |
ARGS="" | |
while test $# -gt 0 | |
do | |
ARGS="$ARGS ${1#/cygdrive/[a-zA-Z]}"; # Remove /cygdrive and disk letter from the path | |
shift | |
done |
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
//definimos el constructor del objeto base y | |
//establecemos las propiedades por instancia | |
function Person (name, age) { | |
"use strict"; | |
this.name = name || "unnamed"; | |
this.age = +age || 0; | |
} | |
//definimos el prototipo del objeto base | |
//estableciendo las propiedades compartidas |
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
/* | |
* Important! | |
* This snippet is deprecated, a best implementation of sortBy can be found here: | |
* https://github.com/jherax/array-sort-by | |
*/ | |
var sortBy = (function () { | |
var toString = Object.prototype.toString, | |
// default parser function | |
parse = function (x) { return x; }, |
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
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no" /> |
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
pact install python-setuptools python-ming | |
pact install libxml2-devel libxslt-devel libyaml-devel | |
curl -skS https://bootstrap.pypa.io/get-pip.py | python | |
Optional/Not sure what these are for: | |
pip install virtualenv | |
curl -skS https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python |
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
/** | |
* Determines whether a text is a palindrome. | |
* Text is lowercased and non-alphabetic characters are removed. | |
* | |
* @param {string} text - the words to check | |
* @return {boolean} | |
*/ | |
function isPalindrome(text) { | |
if (!text || text.length < 2) return false; | |
text = text.replace(/[\s\W]/g, ''); |
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
# in your .zshrc | |
function docker_clean() { | |
containers=$(docker ps -a -q -f status=exited) | |
# echo $containers | |
if [ "" != "$containers" ] ; then | |
docker rm -v $containers | |
fi | |
} |
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
/** | |
* Adds or subtracts date portions to the given date and returns the new date. | |
* | |
* @param {Object} options: It contains the date parts to add or remove, and can have the following properties: | |
* - {Date} date: if provided, this date will be affected, otherwise the current date will be used. | |
* - {number} minutes: minutes to add/subtract | |
* - {Number} hours: hours to add/subtract | |
* - {Number} days: days to add/subtract | |
* - {Number} months: months to add/subtract | |
* - {Number} years: years to add/subtract |
OlderNewer