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
| yay file contents |
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 Item | |
| class Ng.RailsViews.AdminBlogImagesNewView extends Backbone.View | |
| FILE_TYPES: ['image/png', 'image/jpeg', 'image/gif'] | |
| IMAGE_WIDTH = 100 | |
| el: 'body' | |
| events: | |
| 'dragenter #blog-images .drop': 'dragEnter' | |
| 'dragover #blog-images .drop': 'dragOver' |
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 Item | |
| class Ng.RailsViews.AdminBlogImagesNewView extends Backbone.View | |
| FILE_TYPES: ['image/png', 'image/jpeg', 'image/gif'] | |
| IMAGE_WIDTH = 100 | |
| el: 'body' | |
| events: | |
| 'dragenter #blog-images .drop': 'dragEnter' | |
| 'dragover #blog-images .drop': 'dragOver' |
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
| gcd(*neighbour(n, m)) |
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
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle' | |
| }); |
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 'benchmark' | |
| class Measurement | |
| LEAN_BODY_MASS_PARAM = 0.01 # dummy value | |
| attr_reader :weight | |
| def lean_body_mass | |
| weight * LEAN_BODY_MASS_PARAM unless weight.nil? # returns nil when no weight | |
| 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
| require 'dry/monads' | |
| require 'dry/matcher/result_matcher' | |
| module BaseTransaction | |
| include Dry::Monads[:result, :try, :do] | |
| include Dry::Matcher.for(:call, with: Dry::Matcher::ResultMatcher) | |
| def call | |
| run | |
| end |
OlderNewer