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
| module Debug | |
| def whoAmI? | |
| "#{self.type.name} (\##{self.id}): #{self.to_s}" | |
| end | |
| end | |
| class Phonograph | |
| include Debug | |
| def initialize(title) | |
| @title = title |
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 leppard | |
| self.pour(@sugar) | |
| 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
| (function() { | |
| "use strict"; | |
| (42, eval)('var z = 5'); | |
| }()); |
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
| module Foo | |
| class BarGenerator < Rails::Generators::Base | |
| class_option :baz, :aliases => '-b', :type => :string, :default => 'quux', :desc => 'foobar is unfoo' | |
| def bar | |
| puts options[:baz] | |
| end | |
| end | |
| 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 Student; | |
| var students; | |
| var student1; | |
| var student2; | |
| var i, len, student; | |
| Student = (function() { | |
| function Student(fname, lname) { | |
| this.firstName = fname; | |
| this.lastName = lname; |
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
| class App.Marker extends Spine.Model | |
| @configure 'Marker', 'latitude', 'longitude', 'icon' | |
| @extend Spine.Model.Ajax | |
| constructor: -> | |
| super | |
| @gmarker = new google.maps.Marker( | |
| position: new google.maps.LatLng(@latitude, @longitude) | |
| icon: @icon | |
| draggable: true |
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
| $ = jQuery.sub() | |
| Marker = App.Marker | |
| class App.MarkersController extends Spine.Controller | |
| elements: | |
| "#map" : "mapEl" | |
| ".marker" : "markerIcons" | |
| constructor: -> | |
| super |
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 spine/spine | |
| #= require spine/ajax | |
| #= require_tree ./lib | |
| #= require_self | |
| #= require_tree ./models | |
| #= require_tree ./controllers | |
| #= require_tree ./views | |
| #= require_tree . |
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
| weatherReport = (location) -> | |
| # Make an Ajax request to fetch the weather... | |
| [location, 72, "Mostly Sunny"] | |
| [city, temp, forecast] = weatherReport "Berkeley, CA" | |
| futurists = | |
| sculptor: "Umberto Boccioni" | |
| painter: "Vladimir Burliuk" | |
| poet: |
NewerOlder