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
<!DOCTYPE html> | |
<html lang="es"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<style> | |
#container { | |
flex-shrink: 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<style> | |
html, body { | |
width: 100%; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<link rel="stylesheet" type="text/css" href="/asciinema-player.css" /> | |
<script src="/asciinema-player.js"></script> | |
</head> | |
<body> | |
<div id="player-container"></div> | |
<script> | |
function generateCommandList(source) { |
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
var tags = Array.from([].slice.call(document.querySelectorAll('span[class*=tag-programming-language--]')) | |
.map((el)=>[].slice.call(el.classList) | |
.filter((className)=>/language--/.test(className))[0]).reduce((acc,cur)=>acc.add(cur), new Set())); | |
console.table(tags.map((tag) => ({ language : tag.split("--")[1] , total : document.querySelectorAll(`.${tag}`).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
var talksByLikes = [].slice.call(document.querySelectorAll('.ka-td-contents')).map((talk) => ({ title : talk.querySelector('.ka-talk-title').textContent , author: talk.querySelector('.ka-username').textContent, favs : +talk.querySelector('span.ka-button-indicator').textContent, rating : +talk.querySelector('a.ka-like-link + a.ka-social-link').textContent , ratio : talk.querySelector('a.ka-like-link + a.ka-social-link').title })); | |
var currentDay = /5693168230072320/.test(window.location.href) | |
? "5649626120060928" | |
: "5693168230072320"; | |
document.querySelector(`a[data-day-id="${currentDay}"]`).click(); | |
setTimeout(function(){ | |
talksByLikes = talksByLikes.concat([].slice.call(document.querySelectorAll('.ka-td-contents')).map((talk) => ({ title : talk.querySelector('.ka-talk-title').textContent , author: talk.querySelector('.ka-username').textContent, favs : +talk.querySelector('span.ka-button-indicator').textContent, rating : +talk.querySelector('a.ka-like-link + a.ka-social-link').textContent, ratio: ta |
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 getData(day) { | |
return [...document.querySelectorAll('span.button-label + span.button-indicator,.agenda-talk-title, a.agenda-social-link[title*="votes"]')].reduce((o,c,i,a)=>{ | |
if (i % 3 == 0) { | |
o.push({ | |
day: day, | |
title: a[i].textContent, | |
bookmarked: +a[i + 1].textContent, | |
votes: +a[i + 2].title.split(" out of ")[1].split(" votes")[0], | |
rating: +a[i + 2].title.split(" out of ")[0], | |
ratio: +a[i + 2].title.split(" out of ")[1].split(" votes")[0] * 100 / +a[i + 1].textContent |
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
// Carga esta url | |
// https://presupuestosabiertos.madrid.es/es/inversiones/213/puente-de-vallecas#year=2017 | |
// Expande todos los conceptos | |
[...document.querySelectorAll('tr > td >a.toggle')].map( el => el.click() ) | |
// Resalta en amarillo todos los conceptos cuya ejecución presupuestaria es 0 | |
[...document.querySelectorAll('td:nth-child(3)')].filter(el => el.textContent === "0 €").map( el => el.style.backgroundColor = "yellow" ) |
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 propuestas(partido) { | |
let lista = [...document.querySelectorAll('.e-module div[data-option]')].map(el=>({ | |
partido: el.dataset.option, | |
texto: [...el.querySelectorAll('p')].reduce((old,cur)=>old + cur.textContent, "") | |
})).filter(obj=> (partido === "all" ? true : obj.partido === partido) && obj.texto.length > 0); | |
partido === "all" ? console.table(lista) : console.table(lista,["texto"]); | |
let csv = lista.map(r => `"${r.partido}"|"${r.texto.replace(/\n/g, " ")}"`); | |
csv.unshift(`"partido"|"texto"`); | |
// Copia al portapapeles todos los datos a un CSV |
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
cd data/countries | |
time parallel -j+0 curl -sS -o '{}.json' '"https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/World__Countries_Generalized_analysis_trim/FeatureServer/0/query?where=ISO_3DIGIT+%3D+%27{}%27&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&resultType=none&distance=0.0&units=esriSRUnit_Meter&returnGeodetic=false&outFields=ISO_3DIGIT&returnGeometry=true&returnCentroid=false&featureEncoding=esriDefault&multipatchOption=xyFootprint&maxAllowableOffset=&geometryPrecision=&outSR=4326&datumTransformation=&applyVCSProjection=false&returnIdsOnly=false&returnUniqueIdsOnly=false&returnCountOnly=false&returnExtentOnly=false&returnQueryGeometry=false&returnDistinctValues=false&cacheHint=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&having=&resultOffset=&resultRecordCount=&returnZ=false&returnM=false&returnExceededLimitFeatures=true&quantizationParameters=&sqlFormat=none&f=geojson&token="' :::: <(cat list.txt) |
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
parallel --dry-run --colsep '#' curl "{1}" -o {2}.mp3 :::: <(curl -sS "https://fapi-top.prisasd.com/podcast/playser/1_playser/itunes/la_ventana_mas_platon_y_menos_whatsapp/audios.xml" | xml2js | fx '.rss.channel.item.map(({title,enclosure,...rest}) => ({ title : /[|-]/.test(title) ? title.split(/[|-]/)[1].trim() : title, url : enclosure["@_url"]})).map(({title,url}) => ({ title : title.replace(/('|"|")/g, ""), url : url}))' | jq -r '.[] | (.url) + "#" + (.title)') |
OlderNewer