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 parseJwt (token) { | |
var base64Url = token.split('.')[1]; | |
var base64 = base64Url.replace('-', '+').replace('_', '/'); | |
return JSON.parse(window.atob(base64)); | |
}; |
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
// String base 64 to blob | |
function dataURItoBlob(dataURI) { | |
var byteString = atob(dataURI.split(',')[1]); | |
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0] | |
var ab = new ArrayBuffer(byteString.length); | |
var ia = new Uint8Array(ab); | |
for (var i = 0; i < byteString.length; i++) { |
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
// Web-Push | |
// Public base64 to Uint | |
function urlBase64ToUint8Array(base64String) { | |
var padding = '='.repeat((4 - base64String.length % 4) % 4); | |
var base64 = (base64String + padding) | |
.replace(/\-/g, '+') | |
.replace(/_/g, '/'); | |
var rawData = window.atob(base64); | |
var outputArray = new Uint8Array(rawData.length); |
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 OpenInNewTab(url) { | |
var win = window.open(url, '_blank'); | |
win.focus(); | |
} |
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
<? | |
// ====================================================== | |
// Clase: class.Database.php | |
// Funcion: Se encarga del manejo con la base de datos | |
// Descripcion: Tiene varias funciones muy útiles para | |
// el manejo de registros. | |
// | |
// Ultima Modificación: 17 de marzo de 2015 | |
// ====================================================== | |
EN - I’m a web app that wants to allow other web apps access to my users’ information, but I want to ensure that the user says it’s ok.
ES - Soy una aplicación web que quiere permitir que otras aplicaciones web accedan a la información de mis usuarios, pero quiero asegurarme de que el usuario diga que está bien.
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
/** | |
* Metodo para obtener las hojas de un archivo de Excel y cargarlas en un elemento <select>. | |
* Se utilizo la librería SheetJS para este ejemplo. | |
* Henry Díaz, <[email protected]> | |
**/ | |
$('#input-excel').change(function(e) { | |
var reader = new FileReader(); | |
let sheetNames; | |
reader.readAsArrayBuffer(e.target.files[0]); |
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
/** | |
* Metodo para asignar la data de una determinada de un archivo de Excel y cargarlas en un elemento del documento actual. | |
* Se utilizo la librería SheetJS para este ejemplo. | |
* Henry Díaz, <[email protected]> | |
**/ | |
$('#hoja-excel').change(function(e) { | |
let hoja = e.target.value; | |
console.log(e); | |
// console.log($('#input-excel')[0].files); |
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
/* | |
* printThis v1.15.0 | |
* @desc Printing plug-in for jQuery | |
* @author Jason Day | |
* | |
* Resources (based on): | |
* - jPrintArea: http://plugins.jquery.com/project/jPrintArea | |
* - jqPrint: https://github.com/permanenttourist/jquery.jqprint | |
* - Ben Nadal: http://www.bennadel.com/blog/1591-Ask-Ben-Print-Part-Of-A-Web-Page-With-jQuery.htm | |
* |
OlderNewer