Skip to content

Instantly share code, notes, and snippets.

View sebas095's full-sized avatar
🎯
Focusing

Sebastian Duque Restrepo sebas095

🎯
Focusing
View GitHub Profile
@sebas095
sebas095 / random-balls.html
Last active September 24, 2020 07:23
Random move
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Move</title>
<style>
* {
box-sizing: border-box;
@sebas095
sebas095 / invertirNumero.js
Created September 18, 2020 06:07
Función que se encarga de invertir un número dado (solo utilizando ciclos, condicionales y operaciones matemáticas)
function invertirNumero(numero) {
const digitos = Math.floor(Math.log10(numero));
let resultado = 0;
for (let i = 0; i <= digitos; i++) {
let digito = numero % Math.pow(10, digitos - i + 1);
digito = Math.floor(digito / Math.pow(10, digitos - i));
digito = digito * Math.pow(10, i);
resultado += digito;
}
@sebas095
sebas095 / web-servers.md
Created July 26, 2016 05:50 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000