Skip to content

Instantly share code, notes, and snippets.

View highercomve's full-sized avatar
🏠
Working from home for Pantacor 👍

Sergio Marin highercomve

🏠
Working from home for Pantacor 👍
View GitHub Profile
@highercomve
highercomve / gist:6281013
Created August 20, 2013 12:58
Sumatoria de X^N desde X -> 1
# Sumatoria a la N
def sumatoria_n(x, n)
(1..x).inject { |sum, i| sum += i**(n) }
end
# Derivaciones del método sumatoria_n
funciones = ["enteros", "cuadrados", "cubos", "cuarta"]
@highercomve
highercomve / jsbeutify_recursive.sh
Last active July 21, 2016 17:26
Command on shell to use https://github.com/erniebrodeur/ruby-beautify recursive in a folder
find . -name '*.js' -exec sh -c 'js-beautify {} > _tmp_ && mv _tmp_ {}' \;
@highercomve
highercomve / factores_primos.rb
Created November 21, 2013 07:04
Calculo de los factores primos de un numero
def factores_primos(n)
return [] if n == 1
factor = (2..n).find {|x| n % x == 0}
[factor] + factores_primos(n / factor)
end
fib = Enumerator.new do |y|
a = b = 1
loop do
y << a
a, b = b, a + b
end
end
@highercomve
highercomve / erb2slim_recursive.sh
Created March 3, 2014 20:33
erb2slim recursive
find . -name '*.erb' -exec sh -c 'erb2slim {} {}.find' \;
@highercomve
highercomve / intro.html
Last active August 29, 2015 14:03
Clase 1 de HTML/CSS
<!doctype html>
<html lang="en">
<head>
<meta charset='utf-8' />
<title>Introduccion al HTML | Escuelaweb</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<!--Escala y tipos de titulos en html-->
@highercomve
highercomve / estructura1.html
Last active August 29, 2015 14:03
Clase 2 de HTML/CSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Etiquetas de Estructura basicas</title>
<link rel="stylesheet" href="css/estructura.css">
</head>
<body>
@highercomve
highercomve / alineacion1.html
Last active August 29, 2015 14:03
Clase 3 HTML/CSS: Alineación de elementos
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Como Organizar elementos</title>
<link rel="stylesheet" href="https://gist.githubusercontent.com/highercomve/652f3954e06e0fbcd622/raw/a88d84ea9536ae77783aa05d4bdac5cda132e921/alineacion2.css">
</head>
<body>
<header>
<div class="row">
@highercomve
highercomve / parallax1.html
Created July 14, 2014 05:12
Ejemplo Parallax
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ejemplo de Parallax sencillo | Escuelaweb.net</title>
<link rel="stylesheet" href="css/parallax.css">
</head>
<body>
<header>
<div class="row">