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
export function getFile(response) { | |
var result = document.createElement('a'); | |
var contentDisposition = response.headers.get('Content-Disposition') || ''; | |
var filename = contentDisposition.split('filename=')[1]; | |
filename = filename.replace(/"/g,"") | |
return response.blob() | |
.then(function(data) { | |
result.href = window.URL.createObjectURL(data); | |
result.target = '_self'; |
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/node | |
const through = require('through2'); | |
const ARRAY_REGEX = new RegExp(/(\[).*([\s\t\n]?.*)+(\])/g); | |
const IMPORT_REGEX = new RegExp(/import.+([\'|\"])/g); | |
const OBJECT_REGEX = new RegExp(/(\{).*([\s\t\n]?.*)+(\})/gi); | |
function concatArray(arr: string[], items: string[]): string[] { | |
return arr.concat(items); | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'/> | |
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> | |
<title>Document</title> | |
<style> |
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
{"lastUpload":"2018-10-18T10:22:13.836Z","extensionVersion":"v3.2.0"} |
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
<NavbarItems> | |
<NavbarItemLink>Page 1</NavbarItemLink> | |
<NavbarItemLink>Page 2</NavbarItemLink> | |
<NavbarItemLink>Page 3</NavbarItemLink> | |
</NavbarItems> |
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
<?php | |
$my_components = " | |
<NavbarItems> | |
<NavbarItemLink>Page 1</NavbarItemLink> | |
<NavbarItemLink>Page 2</NavbarItemLink> | |
<NavbarItemLink>Page 3</NavbarItemLink> | |
</NavbarItems> | |
"; |
This file has been truncated, but you can view the full file.
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
<Button type="addasdas">addas</Button> | |
<Button type="addasdas">addas</Button> | |
<Button type="addasdas">addas</Button> | |
<Button type="addasdas">addas</Button> | |
<Button type="addasdas">addas</Button> | |
<Button type="addasdas">addas</Button> | |
<Button type="addasdas">addas</Button> | |
<Button type="addasdas">addas</Button> | |
<Button type="addasdas">addas</Button> | |
<Button type="addasdas">addas</Button> |
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
// Creamos un tag Script y lo añadimos al Head | |
// Añadimos los enventos onload/onerror que nos | |
// permitirá resolver/rechazar las promesas | |
// Y eliminamos el elemento del DOM | |
const loadScript = function(path) { | |
const script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = path; | |
script.async = true; | |
entry.promise = new Promise((resolve, reject) => { |
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 importScript(path, events = []) { | |
return new Promise(function(resolve, reject) { | |
if (Array.isArray(events) && events.length) { | |
// Por cada evento lo añadimos a window tan sólo una vez | |
return events.forEach(function(event) { | |
window.addEventListener( | |
event, | |
function() { | |
loadScript(path) | |
.then(resolve) |
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
0especial="https://pastebin.com/raw/iB2Wq6wM" | |
1tv="http://bit.ly/cristal_tv_git" | |
2deportes="https://gist.githubusercontent.com/11joselu/cfa123aad15cdb855cba187aea2817e4/raw/97545e08249cd8da70a4c0d039b55299dab0bb57/gistfile1.txt" |
OlderNewer