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
endSession: -> | |
do restartSession = -> | |
restartSessionTimer = setTimeout -> | |
window.location.href = Etaxi.config.base_url | |
, Etaxi.config.user_session_length | |
do showRestartSessionAlert = -> | |
showRestartSessionAlertTimer = setTimeout -> | |
$z("#notification").animate |
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
item = $z(e.currentTarget) | |
screen_center_x = $z(window).width() / 2 | |
screen_center_y = $z(window).height() / 2 | |
move_to_x = screen_center_x - item.data("screen-offset-x") | |
move_to_y = screen_center_y - item.data("screen-offset-y") | |
# Problem: This returns "true" or "false", instead of "-1000px" or "1000px" | |
item_origin = (item.data("screen-offset-y") > screen_center_y) ? "-1000px" : "1000px" |
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
# THIS WORKS | |
# Videos Router | |
class Etaxi.Routers.Videos extends Backbone.Router | |
routes: | |
'' : 'videos' | |
'videos' : 'videos' | |
initialize: -> |
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
Zencoder::Job.create({ | |
:input => video.video, | |
:region => "europe", | |
:test => !Rails.env.production?, | |
:output => [ | |
{ | |
:type => "segmented", | |
:base_url => base_url, | |
:filename => "#{video.id}_low.m3u8".downscore, | |
:format => "ts", |
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
describe Api::V1::DevicesController do | |
render_views | |
describe "GET" do | |
let!(:device) { | |
@time = Time.now | |
FactoryGirl.create(:device, pinged_at: @time) | |
} |
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
# @news from news_controller#index | |
collection @news | |
attributes :id, :title, :excerpt, :content, :image, :source, :published_at, :created_at | |
node :excerpt do |news| | |
truncate(news.excerpt, :length => 100) | |
end | |
node :content do |news| |
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
Bundler could not find compatible versions for gem "bootstrap-sass": | |
In Gemfile: | |
bootstrap-sass (~> 2.0.1) ruby | |
rails_admin (>= 0) ruby depends on | |
bootstrap-sass (2.1.0.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
class Etaxi.Views.Videoplayer extends Backbone.View | |
template: JST['base/videoplayer'] | |
tagName: "div" | |
id: "overlay-wrapper" | |
className: "videoplayer" | |
options: | |
title: "Video" |
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
{ | |
"id": | |
92, | |
"sponsored": | |
false, | |
"sponsored_content_url": | |
"", | |
"name": | |
"Schwedenplatz", | |
"description": |
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
// | |
// CoreDataTableViewController.h | |
// | |
// Created for Stanford CS193p Winter 2013. | |
// Copyright 2013 Stanford University. All rights reserved. | |
// | |
// This class mostly just copies the code from NSFetchedResultsController's documentation page | |
// into a subclass of UITableViewController. | |
// | |
// Just subclass this and set the fetchedResultsController. |