Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
require 'Win32API' SPI_SETDESKWALLPAPER = 20 SPIF_SENDCHANGE = 0x2 SOURCE_FOLDER = "C:\\Users\\Gaurav\\Pictures\\Best\\" files = Dir.entries(SOURCE_FOLDER) - [".", ".."] file = files[rand(files.length)] systemParametersInfo = Win32API.new("user32","SystemParametersInfo",["I", "I", "P", "I"],"I") p systemParametersInfo.call(SPI_SETDESKWALLPAPER, 1, SOURCE_FOLDER + file, SPIF_SENDCHANGE)
This paste will be private.
From the Design Piracy series on my blog: