Skip to content

Instantly share code, notes, and snippets.

@skryshi
skryshi / gist:6855499
Last active December 24, 2015 20:09
Slots design in ruby :)
a=[];
(1..10).each { |i| a = a + (Array.new i, 10-i+1); };
a.shuffle
<%
require 'cgi'
require 'uri'
def attribute(name, value, force_string = false)
if value
value_string =
if force_string
'"' + value + '"'
else