This file contains 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>Video.js Example Embed</title> | |
<link href="http://vjs.zencdn.net/5.19.2/video-js.css" rel="stylesheet"> | |
<script src="http://vjs.zencdn.net/5.19.2/video.js"></script> | |
</head> |
This file contains 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
//util | |
let cachedBrowser = ''; | |
export function userAgent() { | |
return navigator.userAgent.toLowerCase(); | |
} | |
export function browser() { | |
if (cachedBrowser.length > 0) { | |
return cachedBrowser; |
This file contains 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 Account < ActiveRecord::Base | |
has_many :users | |
end | |
class User < ActiveRecord::Base | |
belongs_to :account | |
end |
This file contains 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
angular.module('ActiveResource').provider('ARMixin', function () { | |
this.$get = function () { | |
return function (receiver, giver, excludeFunctions) { | |
function mixinProp() { | |
if (!receiver.hasOwnProperty(i)) { | |
(function () { | |
var local; | |
Object.defineProperty(receiver, i, { | |
enumerable: true, |
This file contains 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
INPUT STRINGs time= "2014-03-19T04:00:00.000Z" timezone=("Europe/Berlin") | |
CLOSEST THAT I HAVE GOTTEN | |
Time.zone.parse(time).in_time_zone(timezone).to_s | |
=> "2014-03-19 05:00:00 +0100" | |
DESIRED | |
=> "2014-03-19 06:00:00 +0000" |
This file contains 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 Api::V1::FightController < Api::BaseController | |
... | |
private | |
def permitted_params | |
params.permit( | |
{date: [ | |
:timezone, | |
:start, |
This file contains 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
$( "li" ).on( "mouseover", function() { | |
$(this).find($("button")).css("background-color", "yellow"); | |
} |
This file contains 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
'use strict'; | |
angular.module('ultimateJobApplierApp', [ | |
'ngCookies', | |
'ngResource', | |
'ngSanitize', | |
'ngRoute', | |
'ngClipboard' | |
]) | |
.config(function ($routeProvider) { |
This file contains 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 summation_of_primes(max) | |
array_of_nums = (0...max).to_a | |
array_of_nums[0] = nil | |
array_of_nums[1] = nil | |
#skip index 1 as thats number 1 and don't want to add that in later, 0 by default wont be added in | |
prod = 1 | |
array_of_nums.each do |num| | |
next if num == nil | |
until prod > max | |
(2..max).each do |mult| |
This file contains 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() { | |
var availablePlayers = <%= raw @players_array.to_json %>; | |
$( ".nav-search" ).autocomplete({ | |
source: availablePlayers, | |
// play with focus event later | |
focus: function( event, ui ) { | |
$( "textarea" ) = ui.item.label | |
} | |
select: function( event, ui ) { |
NewerOlder