Skip to content

Randy Girard

A Technology Blog

  • About Me
You Are Here
  • Home
  • random

Tag: random

May 9, 2008May 6, 2018 Randy

Ruby random number by day

Ruby

This is a cool little snippet of code that will return a random number, that changes by day:

def random_by_day(max_value)
  srand Time.now.strftime("%m%d%Y").to_f
  rand(max_value)
end

You May Also Like

  • AppPerf Latency Bands with color schemes!

    October 22, 2018
  • How to create a Sidekiq service application without Rails

    May 7, 2018
  • Installing mysql2 Gem error targeting Mac OS X 10.5 or later

    September 21, 2016

My Projects

Open source Application Performance Monitoring

Recent Posts

  • AppPerf Updated to Rails 5.2.2
  • Migrating from Carrierwave to ActiveStorage in Rails
  • How to organize a routes.rb file in Rails
  • WordPress/Nginx response long pauses
  • WordPress vs Everything Else – Why you should not build your own blog

Recent Comments

  • Monroe Mann on Migrating from Carrierwave to ActiveStorage in Rails
  • Ahmad Ya'kob Bin Abaidullah on How to create a Sidekiq service application without Rails
  • Randy on How to create a video upload platform using Ruby on Rails – Part 2
  • yalem on How to create a video upload platform using Ruby on Rails – Part 2
  • Rafał Wrzochol on How to create a Sidekiq service application without Rails

Archives

  • March 2019
  • November 2018
  • October 2018
  • May 2018
  • September 2016
  • August 2014
  • January 2014
  • June 2012
  • January 2011
  • December 2010
  • October 2010
  • July 2010
  • March 2010
  • October 2009
  • July 2009
  • June 2009
  • May 2009
  • March 2009
  • January 2009
  • December 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • February 2008
  • December 2007
  • November 2007

Categories

  • AppPerf
  • Mac OSX
  • Other
  • Rails
  • Ruby
  • Uncategorized
  • Wordpress

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
All Rights Reserved 2020
Proudly powered by WordPress | Theme: Gist by Candid Themes.