Skip to content

Instantly share code, notes, and snippets.

View katiesmillie's full-sized avatar

Katie Smillie katiesmillie

View GitHub Profile
@katiesmillie
katiesmillie / future.rb
Last active August 29, 2015 14:13
Code for Hacker School Application. I had never written anything from scratch, so I decided to tackle something that mimicked the basic functionality one of my side projects, a Rails app called dearfuture.me.
#!/usr/bin/env ruby
require 'yaml'
require 'date'
unless File.exist?("notes.yaml")
File.new "notes.yaml", "w"
end
note_struct = Struct::new("NoteStruct", :message_date, :message, :days_ago)
1.upto(100) { |i|
if i % 3 == 0 and i % 5 == 0
puts "CracklePop"
elsif i % 3 == 0
puts "Crackle"
elsif i % 5 == 0
puts "Pop"
else
puts i