Skip to content

Instantly share code, notes, and snippets.

View 7daysofrain's full-sized avatar

Joseba Alonso 7daysofrain

View GitHub Profile
<!DOCTYPE html>
<html class="no-js" lang="es">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>anim</title>
<link href="css/ws10.css" rel="stylesheet"/>
<style>
.playground{
display: flex;
const data = {
animals: [
{
id: '0938aa23-f153-4937-9f88-4858b24d6bce',
name: 'lions',
popularity: 4,
location: 'NE',
residents: [
{
name: 'Zena',
const lat = 36.527061;
const lng = -6.288596;
const url = `https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lng}&current=temperature_2m,wind_speed_10m&hourly=temperature_2m,relative_humidity_2m,wind_speed_10m`;
function mostrar(tiempo) {
//console.log(tiempo.current.temperature_2m)
//console.log(tiempo.hourly.time[68])
//console.log(tiempo.hourly.temperature_2m[68])
calcularTemperaturaMedia(tiempo, 0);
const lat = 36.527061;
const lng = -6.288596;
const url = `https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lng}&current=temperature_2m,wind_speed_10m&hourly=temperature_2m,relative_humidity_2m,wind_speed_10m`;
function mostrar(tiempo) {
//console.log(tiempo.current.temperature_2m)
//console.log(tiempo.hourly.time[68])
//console.log(tiempo.hourly.temperature_2m[68])
calcularTemperaturaMedia(tiempo, 0);
@7daysofrain
7daysofrain / vibes.js
Created May 17, 2024 18:21
Ordenar Madcool Vibes
let entries = document.querySelectorAll('.entries_list > li');
function s(a,b) {
const av = Number(a.querySelector('.vote_counter').innerText);
const bv = Number(b.querySelector('.vote_counter').innerText);
if(av < bv) {
return -1;
} else if(bv < av){
return 1;
} else {
return 0;