Skip to content

Instantly share code, notes, and snippets.

View kbridge's full-sized avatar

kq kbridge

  • Sunnydale
View GitHub Profile
def get_random_string(length=5)
source=("a".."z").to_a + ("A".."Z").to_a + (0..9).to_a + ["_","-","."]
key=""
length.times{ key += source[rand(source.size)].to_s }
return key
end