Skip to content

Instantly share code, notes, and snippets.

@nicolasiensen
Created June 15, 2012 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicolasiensen/2937480 to your computer and use it in GitHub Desktop.
Save nicolasiensen/2937480 to your computer and use it in GitHub Desktop.
MR Dash
Início: 13 de Outubro de 2011
Deadline: 13 de Abril de 2013
Dias restantes: 375
Dias totais: 548
Membros: 17461
Restantes: 82539
Ideal: 183
Média real: 100
Ontem: 40
Hoje: 221
##########################
# #
# Dashboard do Meu Rio #
# #
##########################
Restam 82539 membros
Precisamos de 220 novos membros por dia
Ontem tivemos 40 novos membros
Ontem atingimos 18% da meta diária
remaining = 100000 - Member.where("created_at < ?", Date.today).count
daily_goal = remaining/(Date.parse("13/4/2013") - Date.today).to_i
yesterday_counter = Member.where("created_at >= ? AND created_at < ?",Date.today - 1.day, Date.today).count
yesterday_percent = yesterday_percent = yesterday_counter.to_f/daily_goal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment