Skip to content

Instantly share code, notes, and snippets.

View khru's full-sized avatar
🦸
Cancer survivor | Love 👨‍💻 | Love 🐘 | Love ⚛

Emmanuel Valverde Ramos khru

🦸
Cancer survivor | Love 👨‍💻 | Love 🐘 | Love ⚛
View GitHub Profile
@khru
khru / index.html
Created December 10, 2021 12:29
Murcia Software Crafters
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
@khru
khru / github-contributors.js
Created December 10, 2021 10:09
Get all contributors from the SW Murcia
(async () => {
const organization = 'SoftwareCraftersMurcia';
const allRepos = await fetchJSON(`https://api.github.com/users/${organization}/repos?per_page=100`);
const allReposName = allRepos.map(repo => repo.name);
let users = [];
// noprotect
for(let repo of allReposName) {
const contributors = await fetchJSON(`https://api.github.com/repos/${organization}/${repo}/contributors?per_page=100&type=all`);
let contributorsName = contributors.map(contributor => contributor.login)
users.push(...contributorsName);
@khru
khru / js
Created September 15, 2021 14:26
cloudflare-ngrok.worker
const validPaths = [
{
path: '/zvo',
redirect: 'https://www.google.com/search?q=zvonimir'
},
{
path: '/javi',
redirect: 'https://www.google.com/search?q=javier'
},
{
Enseñar TDD:
- Modulo 1:
Teoría:
- ¿Qué es TDD?
- Por qué hacer TDD
- Como nos han enseñado a programar (Diseñar -> Programar -> Escribir test) https://chemaclass.medium.com/f6a4b32e62cd
- Qué habitos nos han enseñado
- Como solemos afrontar un problema normalmente
- Cuales son los errores que solemos cometer.
- La ley del cambio
# EJERCICIOS DE PROGRAMACIÓN
1 - Escribir un programa en Java que imprima por pantalla los cuadrados de los 30 primeros números naturales.
2 - Escribir un programa en Java que convierta de euros a dólares. Recibirá un número decimal correspondiente a la cantidad en euros y contestará con la cantidad correspondiente en dolares.
3 - Crea un programa que calcule los 100 primeros números primos
4 - Crea un programa que reciba un número y que me muestre los números primos hasta ese número (maxímo 1000)
- Por variable primero
- Por entrada de datos
5 - Saber si un número es capicua
- Por variable primero
/* CONFIGURATION STARTS HERE */
/* Step 1: enter your domain name like fruitionsite.com */
const MY_DOMAIN = 'emmanuelvalverde.dev';
/*
* Step 2: enter your URL slug to page ID mapping
* The key on the left is the slug (without the slash)
* The value on the right is the Notion page ID
*/
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
<title>JS Bin</title>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
</head>
<body>
SHELL=/bin/bash
include .env
export $(shell sed 's/=.*//' .env)
# MySQL
MYSQL_DUMPS_DIR=data/db/dumps
help:
@echo ""
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.book-container {
display: flex;
align-items: center;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
</head>