Skip to content

Instantly share code, notes, and snippets.

@mverzilli
mverzilli / gist:a54b3b475d2b6741d78d
Created Aug 6, 2014
Error while bundle install'ing
View gist:a54b3b475d2b6741d78d
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/mverzilli/.rbenv/versions/1.9.3-p484/bin/ruby extconf.rb
extconf.rb:25: Use RbConfig instead of obsolete and deprecated Config.
checking for strlcpy() in string.h... yes
creating Makefile
make
compiling binary_protocol_accelerated.c
compiling bytes.c
View hello_world_sdl2.cr
#Instead of this:
require "sdl2/sdl2"
SCREEN_WIDTH = 1280
SCREEN_HEIGHT = 720
SDL2.init
window = SDL2.create_window("SDL Tutorial", LibSDL2::WINDOWPOS_UNDEFINED, LibSDL2::WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, LibSDL2::WINDOW_SHOWN)
View Hello World SDL2
#Instead of this:
require "sdl2/sdl2"
SCREEN_WIDTH = 1280
SCREEN_HEIGHT = 720
SDL2.init
window = SDL2.create_window("SDL Tutorial", LibSDL2::WINDOWPOS_UNDEFINED, LibSDL2::WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, LibSDL2::WINDOW_SHOWN)
@mverzilli
mverzilli / csd_org.txt
Last active Aug 29, 2015
Mapping a CSD organization
View csd_org.txt
La metadata que tiene (*) Tiene que repetirse en todos los campos de ahí para abajo en la jerarquía del modelo.
Los entries con value='' admiten cualquier valor, no hace falta que sean empty.
## Organization
CSDOrganization => XXX (*)
## OID (Text)
CSDAttributeFor => CSDOrganization
CSDAttribute => oid
@mverzilli
mverzilli / csd_addresses.txt
Created Oct 2, 2014
How to map a subset of fields in a RM collection to a CSD Facility Address
View csd_addresses.txt
## Addresses
For each address line, a Text Field with this metadata
CSDAddress => ''
CSDChildOf => CSDFacility
CSDCode => XXX (For example, "Legal", see page 89)
CSDComponent => YYY (One of: "StreetAddress", "City", "Province", "Country", "PostCode", see page 89)
View csd_contact_points.txt
## Contact points
CSDType => "contactPoint" (*)
CSDCode => XXX (*)
## For each contact point text field (see page 95)
CSDContactData => YYY (one of: "equipment", "purpose", "certificate")
View csd_operating_hours.txt
## Facility Operating hours
CSDOperatingHours => XXX (*)
CSDChildOf => CSDFacility (*)
## Open flag (Yes/No field)
CSDOpenFlag => ''
## Day of the week (Integer, Sunday=0, Monday=1, ...)
CSDDayOfTheWeek => ''
View csd_contact.txt
## Contacts
CSDType => contact (*)
CSDCode => XXX (*)
## Names
CSDName => YYY (*)
CSDChildOf => CSDContact (*)
## Forename
CSDForename => ''
@mverzilli
mverzilli / pi.elm
Created Feb 28, 2015
Estimando PI con Montecarlo y Elm
View pi.elm
import List (..)
import Random (pair, float, generate, Seed, initialSeed)
import Signal
import Time (every, millisecond, Time)
import Graphics.Collage (collage, Form, filled, circle, move, toForm)
import Graphics.Element (Element)
import Color (..)
import Window (dimensions)
import Text
import String
View Nautic.elm
import Html (..)
import Html.Attributes (..)
import Html.Events (..)
import Signal
import Graphics.Collage (collage, filled, rect, toForm, move, rotate)
import Graphics.Element (Element, image)
import Window
import Color (..)
import Keyboard (arrows)
import Text (asText)