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 create | |
| @user = User.find_by_email params[:email] | |
| if @user && @user.valid_password?(password) | |
| return redirect_to_oauth_complete(@user.account) if oauth_session? | |
| sign_in @user | |
| redirect_to [:dashboard] | |
| else | |
| flash[:error] = 'You have entered an invalid email or password. Please try again.' | |
| render :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
| /script PlayerFrame:ClearAllPoints() | |
| /script PlayerFrame:SetPoint("RIGHT", UIParent, "CENTER", -250, 250) | |
| /run PlayerFrame:SetUserPlaced(true) | |
| /script TargetFrame:ClearAllPoints() | |
| /script TargetFrame:SetPoint("LEFT", PlayerFrame, "RIGHT", 20, 0) | |
| /run TargetFrame:SetUserPlaced(true) | |
| /script FocusFrame:ClearAllPoints() | |
| /script FocusFrame:SetPoint("TOP", PlayerFrame, "BOTTOM", 50, 0) |
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
| select.form-control { | |
| -webkit-appearance: none; | |
| -moz-appearance: none; | |
| background-color: #fff; | |
| background-image: url("select.png"); | |
| background-repeat: no-repeat; | |
| background-position: right center; | |
| padding-right: 30px; | |
| &:-moz-focusring { |
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> | |
| <meta charset="utf-8"> | |
| <title>FRP Infinite Scroll using Bacon.js</title> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/bacon.js/0.7.53/Bacon.min.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/3.7.0/lodash.min.js"></script> | |
| <style type="text/css"> | |
| body { |
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 Foo | |
| def self.foo=(value) | |
| @foo = value | |
| end | |
| def self.foo | |
| @foo | |
| 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
| # my_file.coffee | |
| # | |
| # view = null | |
| # | |
| # ready controllers: ['sessions'], -> | |
| # view = new Backbone.View() | |
| # view.renderAndAppendTo('#my-widget') | |
| # | |
| # unload controllers: ['sessions'], -> | |
| # view.remove() |
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
| (ns problems.one) | |
| (defn- multiple-of [num x] (zero? (mod x num))) | |
| (defn- multiples-of-three-and-five [x] | |
| (or (multiple-of 3 x) | |
| (multiple-of 5 x))) | |
| (defn- real-numbers-below [x] (range 1 x)) | |
| (defn multiples-of-three-and-five-below [x] |
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.I18n = { | |
| pushDictionary: function(translations) { | |
| I18n.translations = Ember.Object.create(translations); | |
| }, | |
| t: function(key, opts) { | |
| var translation = I18n.translations.get('en.' + key); | |
| opts = opts || {}; |
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
| App.PaginationMixin = Ember.Mixin.create({ | |
| // Define a property called "paginate" that returns the collection to paginate. | |
| currentPage: 0, | |
| perPage: 15, | |
| collectionSize: Ember.computed.alias('paginate.length'), | |
| actions: { | |
| setPage: function(pageNumber) { |