Skip to content

Instantly share code, notes, and snippets.

Konstantin Loginov ksloginov

Block or report user

Report or block ksloginov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:016f41bd5318af5826e50f53c737133e
func getTvSchedulesCountry() -> String {
return Threading.lock(syncLock) {
if let country = Globals.readTVschedule() {
return country
}
return TVHelper.NO_TV_SCHEDULES_KEY
}
}
View gist:8c2020fd4cd08c6143ae131adfc710fe
public func getTvSchedulesCountry() -> String {
return Threading.lock(syncLock) {
if let country = Globals.readTVschedule() {
return country
}
return TVHelper.NO_TV_SCHEDULES_KEY
}
}
View gist:c422d4c79b146d048d1effbf1d364a56
class Threading {
static func lock<T>(_ obj: NSObject, closure: () -> [T]) -> [T] {
objc_sync_enter(obj)
defer { objc_sync_exit(obj) }
return closure()
}
static func lock<T>(_ obj: NSObject, closure: () -> [T]?) -> [T]? {
objc_sync_enter(obj)
View gist:d46ad753e0bee5b21cf51013133b8423
public class Source : Mappable
{
public var id : String = ""
public var leagueId : String = ""
public var leagueName : String = ""
public var parentLeagueId : String = ""
public var name : String = ""
public var teamName : String = ""
public var countryCode : String = ""
public var webUri : String = ""
View gist:e7b63ee19e9e176eacae
public class BarometerDrawable extends Drawable {
private final Paint paintBackground, paintForeground, paintStroke;
private final Paint paintRed, paintYellow, paintGreen, paintRedStroke, paintYellowStroke, paintGreenStroke, paintGreenFillingStroke, paintYellowFillingStroke, paintRedFillingStroke;
private final RectF rectFBackground, rectFForeground, rectFStroke1, rectFStroke2, rectFStrokeColor, rectFBottomBackground;
private final RectF rectFSector, rectFAvatar, rectFSeparator;
private Bitmap starBitmap;
private double value = 0.0;
View gist:31b835597792429184cb
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
View gist:2694432
{"warning": [], "params": {"cookies": {"stream_sid": "e123a11b13bf808b0accf84893cecfc5"}, "arguments": {"device_model": ["iPhone5G"], "client": ["tablet_ios_app"], "device_firmware": ["5"], "device_id": ["123453453423"]}}, "result": {"count": 17, "items": [{"purchase_type": "iap_google", "playback_info": [{"play_url": "http://androiddata.omlet.ru/fa2/tablet_360p/99_frankov_0_tablet_360p_204941.mp4", "drm": "nodrm"}], "phone": 70000000000, "expiration_date": null, "consumption_type": "est", "currency": "usd", "amount": 2.9900000000000002, "purchase_date": "2012-05-14T14:50:50+00:00", "content_type": "movie", "content_id": 506196, "lastplay_info": {"position": 1, "lastplay_date": "2012-05-14T14:51:05.046000"}, "first_play_date": "2012-05-14T14:50:52+00:00", "transaction_id": "4fb11bca0491057d8700006a"}, {"purchase_type": "iap_google", "playback_info": [{"play_url": "http://androiddata.omlet.ru/fa2/tablet_360p/Zalech_na_dno_v_Bryugge_0_tablet_360p_198741.mp4", "drm": "nodrm"}], "phone": 70000000000, "expiration_
View gist:2694406
public class Movie
{
[JsonProperty("content_id")]
public int Id;
[JsonProperty("title_ru")]
public string TitleRu;
[JsonProperty("title_en")]
public string TitleEn;
View gist:2694403
{"warning": [], "params": {"cookies": {}, "arguments": {"device_model": ["iPhone5G"], "client": ["tablet_ios_app"], "stream_sid": null, "device_firmware": ["5"], "device_id": ["123453453423"]}}, "result": {"collections": {"count": 5, "movies": [{"rating": 7.6100000000000003, "genres": [{"genre_id": 29, "title": "Драмы"}, {"genre_id": 37, "title": "Триллеры"}], "movie_drm": "nodrm", "content_type": "movie", "countries": [{"name": "США"}], "price": {"est": {"iap": {"currency": "USD", "value": 2.9900000000000002}}}, "description": "Два брата… Они так не похожи друг на друга. Старший, Сэм — бравый офицер, любящий муж и отец. А младший, Томми, мечется по жизни, словно ходит по лезвию бритвы. Уезжая добровольцем на войну в Афганистан, Сэм просит Томми позаботиться о детях и жене Грейс. Проходит время, от Сэма нет вестей. Его считают без вести пропавшим. Томми, как может, утешает Грейс. Незаметно между ними вспыхивает чувство. Но однажды Сэм возвращается…", "title_en": "Brothers", "studios": [{"name": "Lionsgate"},
You can’t perform that action at this time.