HTML (PUG)
a#linkTerminos(href="#modalTerminos") Terminos y Condiciones
#modalTerminos.lq-modal
.lq-modal__header
Titulo
class Version { | |
private _major: number; | |
private _minor: number; | |
private _patch: number; | |
toString = (): string => `${this._major}.${this._minor}.${this._patch}`; | |
constructor(versionStr: string) { | |
if (versionStr) { | |
const versionRegexp = /([0-9]+).([0-9]+).([0-9]+)$/ |
#!/bin/bash | |
# Reference: https://stackoverflow.com/a/59874960 | |
if [ $# -eq 0 ]; then | |
git stash push -- $(git diff --staged --name-only) | |
else | |
git stash push -m "$@" -- $(git diff --staged --name-only) | |
fi | |
set -- |
const pago = new Promise(function (resolve, reject) { | |
// Esta función se ejecuta al instante | |
setTimeout(() => { | |
// resolve('Resuelto'); | |
reject('Rechazado'); | |
}, 5000); | |
}); | |
const onResolve = data => console.log('RESOLVE', data); |
const request = new XMLHttpRequest() | |
request.open('GET', 'https://jsonplaceholder.typicode.com/users', true); | |
request.onload = function () { | |
console.log('DONE', request.responseText); | |
}; | |
request.onerror = function () { | |
console.log('FAIL', 'Error loading page'); | |
}; |
const fs = require('fs'); | |
const path = require('path'); | |
function existsSync(pathFileOrDirectory) { | |
try { | |
fs.accessSync(pathFileOrDirectory); | |
return true; | |
} catch (err) { | |
return false; | |
} |
- | |
function htmlEscape(str) { | |
return str | |
.replace(/&/g, '&') | |
.replace(/"/g, '"') | |
.replace(/'/g, ''') | |
.replace(/</g, '<') | |
.replace(/>/g, '>') | |
.replace(/\//g, '/'); | |
}; |
// EXAMPLE 1 | |
var formSended = new Signal(); | |
formSended.add(function () { console.log('A'); }); | |
formSended.add(function () { console.log('B'); }); | |
// Put this anywhere in your code | |
formSended.dispatch(); | |
// console output => 'A' | |
// console output => 'B' |
// require jQuery | |
;(function(){ | |
var _p, _init, _done, _fail, _progress, _complete, _data, _index, _item, _jqXHR, _responses; | |
function ProgressiveLoader() { } | |
_p = ProgressiveLoader.prototype; | |
_p.init = function(callback) { | |
_init = callback; |
$http({ | |
url: 'php-scripts/save.php', | |
method: 'POST', | |
data: JSON.stringify($rootScope.user), | |
headers: {'content-type': 'application/json'} | |
}).success(function (data) { | |
}); |