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
| 756 rails _3.2.13_ new raffler | |
| 757 cd raffler/ | |
| 758 git status | |
| 759 ls | |
| 760 rails g controller main index --skip-javascript | |
| 761 rm app/assets/javascripts/main.js.coffee | |
| 762 subl . | |
| 763 git add . | |
| 764 git commit -m "Ran controller generator to create Main controller with an action of Index. Added Loading text to app views main index" | |
| 765 git add . |
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
| // The parameter for search-name should be sanitized in some way of course | |
| @api_result = Rails.cache.fetch("foursquare-#{search-name}") do | |
| Foursquare.search(search-name) | |
| end |
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 Project = Backbone.Model.extend({ | |
| // STEP 5: This is a model of our data that describes its behavior | |
| idAttribute: 'slug', | |
| defaults: { | |
| name: "Default Project", | |
| slug: 'default-project', | |
| github_url: "http://github.com/tibbon/portfolio", | |
| live_url: "http://tibbon.com", | |
| thumbnail_url: "http://github.com/tibbon/portfolio/preview.png", | |
| description: "This is my really awesome portfolio page. Can\'t you see I like making portfolios?" |
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> | |
| <title>David Fisher Portfolio</title> | |
| <link href="styles.css" rel="stylesheet" /> | |
| </head> | |
| <body> | |
| <script id="project-template" type="x-handlebars-template"> | |
| <div class="project"> | |
| <h2>{{name}}</h2> |
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
| $(window).scroll(function() { | |
| // Cache our jQuery selector for window | |
| var win = $(window); | |
| // Infinite scroll math! | |
| if(win.height() + win.scrollTop() >= $(document).height()) { | |
| populateCountries(); | |
| } | |
| }); |
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 'tweetstream' | |
| TweetStream.configure do |config| | |
| config.consumer_key = 'YOUR-KEY' | |
| config.consumer_secret = 'YOUR-SECRET' | |
| config.oauth_token = 'YOUR-OAUTH' | |
| config.oauth_token_secret = 'YOUR-OAUTH-SECRET' | |
| config.auth_method = :oauth | |
| end |
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 checkingBalance = 0; | |
| var savingsBalance = 0; | |
| // replace window.onload | |
| $(function() { | |
| $("#checkingDeposit").click(depositChecking); | |
| $("#savingsDeposit").click(depositSaving); | |
| $("#checkingWithdraw").click(withdrawChecking); | |
| $("#savingsWithdraw").click(withdrawSaving); | |
| updateDisplay(); |
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
| // String literal, string primitive | |
| // This is not an object | |
| // This doesn't have any of its own functions | |
| var schoolName = "General Assembly" | |
| // When I call this, it temporarily makes a String Object around it. | |
| // Slower. I'll talk about why in a second | |
| var upperCaseSchoolName = schoolName.toUpperCase | |
| /* |
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
| function calculateHeight(startPoint, endPoint) { | |
| // This function has access to startPoint and endPoint. Nothing else does. | |
| return Math.abs(startPoint - endPoint) | |
| } | |
| function calculateWidth(startWidth, endWidth) { | |
| // Function arguments act as local. ie. startWidth here is local | |
| // This function has access to startWidth and endWidth. Nothing else does. | |
| // Does this have access to a, b, x, y? No | |
| // Does this have access to q? No |