Skip to content

Instantly share code, notes, and snippets.

@mashbash
mashbash / gist:5090840
Created March 5, 2013 14:53
Survey Gorilla Group Project
https://github.com/JustSilverman/survey_gorilla
@mashbash
mashbash / gist:5059406
Created February 28, 2013 19:33
js_form_validation
https://github.com/mashbash/formvalidation.git
@mashbash
mashbash / gist:5036127
Created February 26, 2013 05:23
css_singlepagenav
https://github.com/mashbash/css_singlepagenav.git
@mashbash
mashbash / dictionary_sort.rb
Created January 29, 2013 05:22
Dictionary sort
def dictionary_sort(arr)
puts arr.sort
end
def input_dictionary
puts "Type a word:"
arr = []
arr << gets
input = ''
@mashbash
mashbash / arrayloopifelse.rb
Created January 3, 2013 11:03
I get this error when I run it, NoMethodError: undefined method `%' for nil:NilClass. Looked around and realized this is not directly the error of the modulus operator but the way I set up my loop is wrong.
def super_fizzbuzz(array)
new_array=[]
array.each do |i|
if array[i]%15 == 0
new_array[i] = "FizzBuzz"
elsif array[i]%3 == 0
new_array[i] = "Fizz"
elsif array[i]%5 == 0
new_array[i] = "Buzz"
else