Skip to content

Instantly share code, notes, and snippets.

View agar3s's full-sized avatar

Gio agar3s

View GitHub Profile
fun naranjas(n:int) =
let fun funcion_auxiliar(numero, acumulador) =
if numero = 0 then
acumulador
else
funcion_auxiliar(numero - 1, acumulador * numero)
in
funcion_auxiliar(n, 1)
end;
@agar3s
agar3s / index.html
Created July 29, 2013 21:37
A CodePen by Giovanny.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Canvas Background</title>
</head>
<body>
<header>
<h1>Hello canvas background</h1>
</header>
@agar3s
agar3s / generator.py
Last active December 9, 2016 20:53
This script creates a midi file using an image as the source of inspiration
#!/usr/bin/python
import sys
import Image
from midiutil.MidiGenerator import MidiGenerator
from midiutil.TrackGen import LoopingArray
filename = sys.argv[1]
midifilename = filename[0:filename.find('.')]+'.midi'
@agar3s
agar3s / index.html
Created August 8, 2013 05:28
A CodePen by Giovanny.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>The Game</title>
</head>
<body>
<canvas id="board" width='700' height='600'></canvas>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script>
@agar3s
agar3s / index.html
Created August 12, 2013 17:47
A CodePen by Giovanny. Chess Board - Week 7 Game - This is the first approach to create the board and the ui. To know more about this project: http://aweeklyproject.tumblr.com/tagged/week-7
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>The Game</title>
</head>
<body>
<canvas id="board" width='700' height='600'></canvas>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script>
@agar3s
agar3s / Akari.markdown
Created September 23, 2013 19:36
A Pen by Giovanny.

Akari

Akari is a puzzle game, you need to put the lights in the free cells to light all the room. rules are simple: a numbered cell means you must to put that number of lights just side to that cell.

A Pen by Giovanny on CodePen.

License.

@agar3s
agar3s / A-Pen-by-Giovanny.markdown
Created October 7, 2013 02:25
A Pen by Giovanny.
@agar3s
agar3s / BubbleSort
Created December 6, 2013 04:27
Una corta explicación de bubbleSort para ordenamiento de arreglos. http://youtu.be/v5kLxVtYF9k
function ordenar(numeros){
for(var i=0; i<numeros.length; i++){
numeros[i] = parseInt(numeros[i]);
}
for(i=0; i<numeros.length; i++){
for(var j=0; j<numeros.length-1; j++){
if(numeros[j] > numeros[j+1]){
var tmp = numeros[j+1];
numeros[j+1] = numeros[j];
@agar3s
agar3s / Pixel-art-Experiments.markdown
Created August 19, 2014 22:54
A Pen by Giovanny.
Estado del Arte desarrollo de videojuegos en HTML5
-- Capacidades en el browser
- canvas
- webgl
- dispositivos de entrada
- key events
- mouse events
- usermedia: http://www.html5rocks.com/es/tutorials/getusermedia/intro/
- mic