Skip to content

Instantly share code, notes, and snippets.

@daveshah
Created November 21, 2013 01:47
Show Gist options
  • Save daveshah/7574713 to your computer and use it in GitHub Desktop.
Save daveshah/7574713 to your computer and use it in GitHub Desktop.
creating a random file name: Generating a (probable) prime number 100 bits in length then converting to the base 36 string representation
import math.BigInt
import math.BigInt._
import util._
val randomFileName = probablePrime(100,Random) toString 36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment