I hereby claim:
- I am acconrad on github.
- I am acconrad (https://keybase.io/acconrad) on keybase.
- I have a public key ASAl3LMybroeC3NqsIXLB-mWaKMbrde_XaoDfzZLzlItuAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| // Works in IE9+, Chrome, Safari, Firefox, and Opera | |
| // | |
| // Examples: | |
| // (5).upTo(10) => [5, 6, 7, 8, 9, 10] | |
| // (-1).upTo(3) => [-1, 0, 1, 2, 3] | |
| Number.prototype.upTo = function( upper ){ | |
| 'use strict'; | |
| var lower = this; | |
| if ( lower == undefined ) { |
| class TestClass | |
| LIST_OF_METHODS = { | |
| 1 => -> { method_1 } | |
| 2 => -> { method_2 } | |
| } | |
| def select_method(number) | |
| LIST_OF_METHODS[number].call | |
| end |
| // ---------------------------------------------------------- | |
| // A short snippet for detecting versions of IE in JavaScript | |
| // without resorting to user-agent sniffing | |
| // ---------------------------------------------------------- | |
| // If you're not in IE (or IE version is less than 5) then: | |
| // ie === undefined | |
| // If you're in IE (>=5) then you can determine which version: | |
| // ie === 7; // IE7 | |
| // Thus, to detect IE: | |
| // if (ie) {} |
| begin | |
| @user_answer = @user.user_answers.where(:question_id => @question_id).first | |
| if @user_answer | |
| @user_answer.answer_id = @answer_id | |
| @user_answer.save! | |
| @message = 'Answer updated successfully!' | |
| else | |
| @user.user_answers.create(:question_id => params[:questionId], :answer_id => params[:answerId]) | |
| @message = 'Answer submitted successfully!' | |
| end |
| /* | |
| * jQuery live links plugin | |
| * http://github.com/nje | |
| */ | |
| (function($){ | |
| var oldattr = $.attr, | |
| oldval = $.fn.val, | |
| olddata = $.data; |
| 'use strict' | |
| # App Module | |
| angular.module('myApp', ['myFilters', 'myServices']).config ['$routeProvider', ($routeProvider) -> | |
| $routeProvider.when('/users', | |
| templateUrl: '<%= asset_path("leaderboard.html") %>' | |
| controller: LeaderboardCtrl | |
| ) | |
| ] |
| @media only screen and (min-width: 320px) { | |
| /* Small screen, non-retina */ | |
| } | |
| @media | |
| only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
| only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
| only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |
| function addDailyPlayer (element) { | |
| if (logged_in) { | |
| var $row = $(element).closest('li') | |
| , $myTeam = $('#player_confirmation_table').children('tbody') | |
| , playerSlotAvailableNew = 0 | |
| , useFlex = false | |
| , $playerInfo | |
| , $playerSlot | |
| , playerId | |
| , gameId |
| @media only screen and (-webkit-device-pixel-ratio: .75) { | |
| /* CSS for Low-density screens goes here * | |
| * Ex: HTC Evo, HTC Incredible, Nexus One */ | |
| } | |
| @media only screen and (-webkit-device-pixel-ratio: 1) and (max-device-width: 768px) { | |
| /* CSS for Medium-density screens goes here * | |
| * Ex: Samsung Ace, Kindle Fire, Macbook Pro * | |
| * max-device-width added so you don't target laptops and desktops */ | |
| } |