This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'pp' | |
| require 'awesome_print' | |
| require 'colorize' | |
| class House | |
| attr_reader :name, :description, :pictures, :rooms, :address | |
| def initialize(args = {}) | |
| @name = args[:name] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Add in base 7 routes | |
| get '/notes' do | |
| @notes = Note.all | |
| erb :'notes/_index' | |
| end | |
| get '/notes/new' do | |
| @note = Note.new | |
| erb :'notes/_new' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| // This is called after the document has loaded in its entirety | |
| // This guarantees that any elements we bind to will exist on the page | |
| // when we try to bind to them | |
| // See: http://docs.jquery.com/Tutorials:Introducing_$(document).ready() | |
| Person = function(attribute){ | |
| this.attributes = attributes | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| // This is called after the document has loaded in its entirety | |
| // This guarantees that any elements we bind to will exist on the page | |
| // when we try to bind to them | |
| // See: http://docs.jquery.com/Tutorials:Introducing_$(document).ready() | |
| Person = function(attribute){ | |
| this.attributes = attributes | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var handleBarListener = function() { | |
| $(".ajax-private-profile-button").on("ajax:success", function(event, data, status, xhr){ | |
| console.log("INSIDE ajax-private-profile-button"); | |
| console.log(data); | |
| $(".old-profile").fadeOut("slow"); | |
| setTimeout(function(){$(".private-profile-handlebars").fadeIn();}, 1000); | |
| var templateIndexSource = $(".private-profile-template").html(); | |
| // debugger; | |
| // console.log(templateIndexSource); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #################################### | |
| #################################### | |
| #################################### | |
| ####### METAGAME ########### | |
| ####### SCHEMAS ########### | |
| ####### ########### | |
| ####### Contributors ########### | |
| ####### ########### | |
| ####### BootCoder ########### | |
| ####### MisterDamon ########### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ORIGINAL CODE (NOT ALTERED) | |
| # def to_roman(num) | |
| # roman_values = { 'M'=>1000, | |
| # 'D'=>500, | |
| # 'C'=>100, | |
| # 'L'=>50, | |
| # 'X'=>10, | |
| # 'V'=>5, | |
| # 'I'=>1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def north_korean_cipher(coded_sentence) | |
| input = coded_sentence.downcase.split("") # takes the input and splits each letter into its own string. Check out this method in IRB to see how it works! Also refer to the ruby docs. | |
| decoded_sentence = [] #blank array | |
| cipher = {"e" => "a", # This is technically a shift of four letters...Can you think of a way to automate this? Is a hash | |
| "f" => "b", # the best data structure for this problem? What are the pros and cons of hashes? | |
| "g" => "c", | |
| "h" => "d", | |
| "i" => "e", | |
| "j" => "f", | |
| "k" => "g", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <script type="text/javascript"> | |
| var player = { | |
| name: "Eddie Murphy", | |
| }; | |
| var ogre = { |