Skip to content

Instantly share code, notes, and snippets.

View igkuz's full-sized avatar

Igor Kuznetsov igkuz

  • Tiny
  • Valencia, Spain
View GitHub Profile
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
class ApplicationController < ActionController::Base
protect_from_forgery
include AuthHelper
end
module AuthHelper
def sign_in(user)
session[:user_id] = user.id
end
def sign_out
session[:user_id] = nil
end
def signed_in?
params = {
"q[beginning_lteq]" => start_of_period,
"q[ending_gt]" => start_of_period,
"q[ending_lt]" => end_of_period
}
remoteAcquireControl: function () {
var controlMap = {};
controlMap[R.Keys.Left] = "onKeyPressLeft";
controlMap[R.Keys.Right] = "onKeyPressRight";
controlMap[R.Keys.Down] = "onKeyPressDown";
controlMap[R.Keys.Up] = "onKeyPressUp";
root.rcu = function (event) {
console.log("Control receive", event);
remoteAcquireControl: function () {
var controlMap = {};
controlMap[R.Keys.Left] = "onKeyPressLeft";
controlMap[R.Keys.Right] = "onKeyPressRight";
root.rcu = function (event) {
console.log("Control receive", event);
var handler = this[controlMap[event.code]]
if (!handler) return true;
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);
},
//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();
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
b_email__t:
color: "#f9ed32"
font_name: "Gotham Pro Bold"
font_size: 72
width: 1855
line_alignment: align_center
margin_top: 92