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
| const express = require('express') | |
| const next = require('next') | |
| const Cache = require('lru-cache'); | |
| const compression = require('compression') | |
| const port = parseInt(process.env.PORT, 10) || 3000 | |
| const dev = process.env.NODE_ENV !== 'production' | |
| const app = next({ dev }) |
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
| // ========================================================= | |
| // Gulp Task: browsersync | |
| // NOTE: Using gulp v4 | |
| // Description: Sync sass, typescript, html, and browser | |
| // using external config or add modify src | |
| // npm install --save-dev browser-sync gulp-typescript gulpjs/gulp.git#4.0 gulp-load-plugins | |
| // Options: node-sass gulp-sass || gulp-ruby-sass | |
| // ========================================================= | |
| var config = require('../config.js'); | |
| var browserSync = require('browser-sync').create(); |
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 | |
| $imgTest = 'https://arc-anglerfish-arc2-prod-gruporepublica.s3.amazonaws.com/public/GDAJPDXRN5EJHNC22N6FTPAWEA.png'; | |
| function generarImagen($imgUrl, $witdh = 0, $height = 0) | |
| { | |
| if (!empty($imgUrl) && strpos($imgUrl, 'https') !== false) { | |
| $thumbor_server = "SERVER"; | |
| $thumbor_key = "APIKEY"; | |
| $parametros = array( | |
| $witdh . "x" . $height, |
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 convertHtmlToText() { | |
| var inputText = document.getElementById("input").value; | |
| var returnText = "" + inputText; | |
| //-- remove BR tags and replace them with line break | |
| returnText=returnText.replace(/<br>/gi, "\n"); | |
| returnText=returnText.replace(/<br\s\/>/gi, "\n"); | |
| returnText=returnText.replace(/<br\/>/gi, "\n"); | |
| //-- remove P and A tags but preserve what's inside of them |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <rss version="2.0"> | |
| <channel> | |
| <title>Example Feed</title> | |
| <description>Insert witty or insightful remark here</description> | |
| <link>http://example.org/</link> | |
| <lastBuildDate>Sat, 13 Dec 2003 18:30:02 GMT</lastBuildDate> | |
| <managingEditor>johndoe@example.com (John Doe)</managingEditor> |
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
| { | |
| "@context":"http://schema.org", | |
| "@type":"LiveBlogPosting", | |
| "url":"https://elcomercio.pe/deporte-total/futbol-mundial/manchester-city-vs-leicester-vivo-online-ver-gratis-via-directv-sports-duelo-clave-premier-league-noticia-ver-goles-resumen-tendencia-viral-streaming-live-free-632586", | |
| "publisher":{ | |
| "@id":"https://elcomercio.pe/#publisher" | |
| }, |
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
| // Register Custom Taxonomy | |
| function ess_custom_taxonomy_Item() { | |
| $labels = array( | |
| 'name' => 'Brands', | |
| 'singular_name' => 'Brand', | |
| 'menu_name' => 'Brands', | |
| 'all_items' => 'All Brands', | |
| 'parent_item' => 'Parent Brand', | |
| 'parent_item_colon' => 'Parent Brand:', |
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
| schema { | |
| query: RootQueryType | |
| mutation: RootMutationType | |
| } | |
| type RootQueryType { | |
| currentUser: CurrentUser | |
| billing: Billing | |
| } |
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
| var AWS = require("aws-sdk"); | |
| exports.handler = (event, context, callback) => { | |
| var s3 = new AWS.S3(); | |
| var sourceBucket = "SOURCE-BUCKET"; | |
| var destinationBucket = "DESTINATION-BUCKET"; | |
| var objectKey = event.Records[0].s3.object.key; | |
| var copySource = encodeURI(sourceBucket + "/" + objectKey); | |
| var copyParams = { Bucket: destinationBucket, CopySource: copySource, Key: objectKey }; | |
| s3.copyObject(copyParams, function(err, data) { |
NewerOlder