Skip to content

Instantly share code, notes, and snippets.

View charliemaffitt's full-sized avatar

Charlie Maffitt charliemaffitt

View GitHub Profile
var rand = Math.floor(Math.random()*index); // generate the random number
var rand2 = Math.floor(Math.random()*index); // generate the second random number
if (rand == rand2) {
var rand2 = Math.floor(Math.random()*index); // generate another random number
}
if (rand == rand2) {
var rand2 = Math.floor(Math.random()*index); // generate another random number (this raises the chance of duplicate entries to 1/64)
}
if (rand == rand2) {
var rand = Math.floor(Math.random()*index); // generate the random number
var rand2 = Math.floor(Math.random()*index); // generate the second random number
if (rand == rand2) {
var rand2 = Math.floor(Math.random()*index); // generate another random number
}
if (rand == rand2) {
var rand2 = Math.floor(Math.random()*index); // generate another random number (this raises the chance of duplicate entries to 1/64)
}
if (rand == rand2) {
@folders = Folder.find(:all, :include => [:documents => {:groups => :users}], :conditions => "users.id = #{user.id}" )
Task.find(:all, :include => [:projects, {:comments => :user}])
Task.find(:all, :include => [:projects, {:comments => :user}])
<% form_tag('http://campaignmonitorusername.cmail1.com/s/318810/') do %>
<p>
Email:<br />
<%= text_field_tag 'cm-318810-318810', params['cm-318810-318810'], :class => 'formfield' %>
<input type="submit" value="Sign Up" />
</p>
<% end %>