Skip to content

Instantly share code, notes, and snippets.

View azhurb's full-sized avatar

Oleksii Zhurbytskyi azhurb

View GitHub Profile
/**
* `keyProcessing` is function for catching keys down events and call functions appropriate each event
*
* @function
* @name keyProcessing
* @param {function(event):*}
* @example
* keyProcessing(some.event);
* @return void
*/
var version='1.0.3',
pages={"back":"file:///home/web/services.html"},
def = {"lang":"en"},
current = {
"mode": {
"debug":false, // create a _log and insert into #debug div
"emulate":false, // set "true" if you wanna test version in browser
"show_all_keydowns":false
},
"lang":"en", // system language
/**
* `byID` is function for return element object
*
* @function
* @name byID
* @param {function(id):*}
* @example
* byID('frame');
* @return [object]
*/
@azhurb
azhurb / master.class.php
Last active December 10, 2015 04:28
Fix vod tariff bug (issue #1446)
<?php
/**
* Master for storages.
*
* @package stalker_portal
* @author [email protected]
*/
abstract class Master
{
@azhurb
azhurb / app.js
Created January 22, 2013 09:38
Fix "The Mentalist"
var app = {};
app.ctrls={
'init':function(){
if(as.dvice_model == 'MAG200'){
views.home.child[0].child[2].attrs.id = 'button_search';
views.home.child[0].child[2].attrs.html = '{$cat_search$}';
views.home.child.splice(1, 1);
}
app.ctrls.drawScreen(
function(){
@azhurb
azhurb / restcommandaccountsubscription.class.php
Created February 6, 2013 13:31
Added optional package subscription (issue #1440)
<?php
class RESTCommandAccountSubscription extends RESTCommand
{
public function get(RESTRequest $request){
$identifiers = $request->getIdentifiers();
if (!empty($identifiers[0]) && strlen($identifiers[0]) >= 12){
$users_ids = Stb::getUidByMacs($identifiers);
@azhurb
azhurb / epg.class.php
Created February 7, 2013 13:38
Fix epg import when programs is not ordered by date (issue #1487)
<?php
/**
* Epg from XMLTV
*
* @package stalker_portal
* @author [email protected]
*/
class Epg
{
@azhurb
azhurb / base-funcs.js
Created February 14, 2013 10:02
Fix youtube (issue #1551)
/**
* `byID` is function for return element object
*
* @function
* @name byID
* @param {function(id):*}
* @example
* byID('frame');
* @return [object]
*/
@azhurb
azhurb / 1627.patch
Created March 19, 2013 12:00
Fix nPVR option (issue #1627)
Index: add_itv.php
===================================================================
--- add_itv.php (revision 3575)
+++ add_itv.php (revision 3576)
@@ -82,14 +82,12 @@
$enable_tv_archive = 0;
}
- $storage_name = empty($_POST['storage_name']) ? '' : $_POST['storage_name'];
-
@azhurb
azhurb / kinopoisk.class.php
Created April 10, 2013 09:30
Fix kinopoisk parser (issue #1761)
<?php
class Kinopoisk
{
public static function getInfoById($id){
$movie_info = array('kinopoisk_id' => $id);
$movie_url = 'http://www.kinopoisk.ru/film/'.$id.'/';