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 Web::Client::ApplicationController < Web::ApplicationController | |
| before_filter :authenticate_client! | |
| helper_method :current_client, :signed_in? | |
| layout "client/application" | |
| def current_client | |
| current_user.client |
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 ApplicationController < ActionController::Base | |
| protect_from_forgery | |
| include AuthHelper | |
| 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
| module AuthHelper | |
| def sign_in(user) | |
| session[:user_id] = user.id | |
| end | |
| def sign_out | |
| session[:user_id] = nil | |
| end | |
| def signed_in? |
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
| params = { | |
| "q[beginning_lteq]" => start_of_period, | |
| "q[ending_gt]" => start_of_period, | |
| "q[ending_lt]" => end_of_period | |
| } |
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
| makeFlush: function(event) { | |
| // FIXME - скоро уедет в отдельных хешик в event, не прозевать | |
| let flush_props = _(event).pick('player-event-in', 'player-event-out', 'rengine-event-in', 'rengine-js-in'); | |
| // Можно передать -11000 - магическую константу для прогноза ренжина | |
| nptv_flush(event['cdiff'] + 2, flush_props); | |
| }, | |
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
| //SFKJS | |
| const Clutter = imports.gi.Clutter; | |
| var white = new Clutter.Color(); | |
| white.from_string('white'); | |
| var currentDate = function() { | |
| var currentdate = new Date(); | |
| return currentdate.getHours() + ":" + currentdate.getMinutes() + ":" + currentdate.getSeconds(); |
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 process_right | |
| if should_show_next_page | |
| repository.read(default_options.merge(page: @meta.next_page)).on_success do |channels| | |
| @view.next_page(channels) | |
| end | |
| else | |
| @view.focus_next_item | |
| 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
| b_email__t: | |
| color: "#f9ed32" | |
| font_name: "Gotham Pro Bold" | |
| font_size: 72 | |
| width: 1855 | |
| line_alignment: align_center | |
| margin_top: 92 |