Skip to content

Instantly share code, notes, and snippets.

View rubentd's full-sized avatar

Ruben Torres rubentd

View GitHub Profile
import { gaSettings } from 'config';
// parse the country code from the url
const parseCountry = (url) => {
const parts = url.split('/');
const locale = parts[3];
if (locale) {
return locale.split('-')[1];
}
return '';
// This snippet is run when the React app has completed rendering the first page
// wait for OneTrust to be initialized
await waitForOneTrust();
try {
window.OneTrust.LoadBanner();
} catch(err) {
console.log('Error loading banner', err);
}
initGTM();
2
7 19 2
3 7 3
'use strict';
const fs = require('fs');
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
$("#ampliar_imagen").on('click', function(e) {
e.preventDefault();
$('figure > a.vce-single-image-inner.vce-single-image--absolute').trigger('click');
});
1
15 15
220453592126560
224213133098692
474386082879648
522356951189169
887109450487496
252802633388782
502771484966748
995975207693799
2
10 10
7283455864
6731158619
8988242643
3830589324
2229505813
5633845374
6473530293
7053106601
const fs = require('fs');
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', inputStdin => {
inputString += inputStdin;
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
export default function flatten(a) {
let flat = [];
for(var item of a){
if(Array.isArray(item)){
flat = flat.concat(flatten(item));
}else{
flat.push(item);
}
}
return flat;