Skip to content

Instantly share code, notes, and snippets.

View fcofdez's full-sized avatar

Francisco Fernández Castaño fcofdez

View GitHub Profile
@fcofdez
fcofdez / zeus.json
Created January 11, 2013 08:03
Example of zeus configuration
{
"command": "ruby -rubygems -r./custom_plan -eZeus.go",
"plan": {
"boot": {
"default_bundle": {
"development_environment": {
"prerake": {"rake": []},
"runner": ["r"],
"console": ["c"],
@fcofdez
fcofdez / .gitignore
Created January 11, 2013 08:05
.gitignore for zeus
custom_plan.rb
zeus.json
@fcofdez
fcofdez / gist:4758093
Last active December 12, 2015 10:19
Metaprogramming Ruby talk
Qué?
Metaprogramming is code that writes code
Metafora lenguaje compilado - dinámico
Ruby es un lenguaje dinámico y orientado a objetos
Todo son mensajes que se pasan
Manejo de esos mensajes
Dónde manejamos esos mensajes?
Ruby object model
Open Classes
Monkey Patchs
@fcofdez
fcofdez / gist:4955358
Last active December 13, 2015 18:28
Code 1
class Computer
def initialize(computer_id, data_source)
@id = computer_id
@data_source = data_source
end
def mouse
info = @data_source.get_mouse_info(@id)
price = @data_source.get_mouse_price(@id)
result = "Mouse: #{info} ($#{price})"
return "* #{result}" if price >= 100
@fcofdez
fcofdez / Test.md
Last active August 29, 2015 14:01

#This is a test

@fcofdez
fcofdez / nintendotetrisai.md
Created May 13, 2014 14:50
Applying Artificial Intelligence to Nintendo Tetris