Skip to content

Instantly share code, notes, and snippets.

View serhatsezer's full-sized avatar
🎯
Focusing

Serhat Sezer serhatsezer

🎯
Focusing
View GitHub Profile
All http header {
AccessToken = "e36ee49a-f411-4bd4-9961-473652b9adf7";
AppVersion = "3,71";
ClientId = "b2e1feeb-d21c-4357-a001-8d6997d3fd79";
ClientSecret = "9bd4df1c-e072-4c8c-9e40-305e656d7241";
"User-Agent" = kamilkoc;
UserIP = "192.168.19.78";
systemVersion = "8.4";
}
@serhatsezer
serhatsezer / swift
Created December 17, 2015 21:49
extension by retrofitting gist
let myString: String? = nil
protocol PossiblyEmpty {
var isEmpty: Bool { get }
}
extension String: PossiblyEmpty {}
extension Optional where Wrapped: PossiblyEmpty {
var isEmpty: Bool {
@serhatsezer
serhatsezer / objective-c
Created January 27, 2016 11:43
GA dimension
id tracker = [[GAI sharedInstance] defaultTracker];
[tracker set:kGAIScreenName value:screenName];
// Custom Dimensions
[tracker set:@"userID" value:[self dimensionWithType:CustomDimensionTypeUserID]];
[tracker set:[GAIFields customDimensionForIndex:1] value:[self dimensionWithType:CustomDimensionTypeUserID]];
[tracker set:[GAIFields customDimensionForIndex:2] value:[self dimensionWithType:CustomDimensionTypeSignUpDate]]; // YYYYMMDD formatinda ilk app signup tarihi
[tracker set:[GAIFields customDimensionForIndex:3] value:[self dimensionWithType:CustomDimensionTypeGender]]; // Eğer login ise" Yes " değil ise "No " olarak gönderilmelidir
[tracker set:[GAIFields customDimensionForIndex:4] value:@""]; // Bulunduğu Lokasyon
{
JobListParameter = "{\"wex\":null,\"id\":null,\"dty\":null,\"ss\":null,\"jbsc\":null,\"irc\":null,\"sf\":null,\"if\":null,\"chso\":null,\"wa\":null,\"lpst\":null,\"ckw\":null,\"tt\":null,\"injv\":null,\"fpfc\":null,\"abp\":null,\"isbl\":null,\"jbc\":null,\"mnsl\":null,\"cp\":null,\"opj\":null,\"iw\":null,\"ms\":null,\"cs\":null,\"pkw\":null,\"tpst\":null,\"lg\":null,\"isin\":null,\"edl\":null,\"ct\":\"c6,c1\",\"huac\":null,\"kw\":\"ios\",\"cid\":null,\"date\":null,\"ofc\":null,\"df\":null,\"slr\":null,\"fpiso\":null,\"sui\":null,\"pst\":null,\"isc\":null,\"in\":null,\"ps\":null,\"so\":null,\"ia\":null,\"mxsl\":null,\"hc\":null,\"slyr\":null,\"fphr\":null}";
isSetParameter = 1;
skip = 1;
take = 20;
}
// Interface file (.h)
@interface SampleModel
@property(nonatomic, strong) NSString *Title;
@property(nonatomic, strong) NSString *Description;
@end
// Implementation file (.m)
@interface SampleModel
@property(nonatomic, copy) NSString *customProperty; // Framework maps this property too
#import "JSONModel.h"
typedef NS_ENUM(NSInteger, JobListCriteriaCallType) {
JobListCriteriaCallTypeCity = 1,
JobListCriteriaCallTypeCountry = 2,
JobListCriteriaCallTypeSector = 5,
JobListCriteriaCallTypeDepartment = 6,
JobListCriteriaCallTypePosition = 12
};
#import "KNJobListParameter.h"
#import "KNJobSearchUtils.h"
@implementation KNJobListParameter
+ (JSONKeyMapper *)keyMapper {
return [[JSONKeyMapper alloc] initWithDictionary:[self mapping]];
}
{
"ct":"",
"wa":"",
"kw":"developer",
"pst":"",
"lpst":"",
"slyr":0,
"tpst":"",
"sf":"1d", // not setted!
"cp":1,
<b>Alınacak Personel Sayısı:3</b>
<ul>
<li>Personeller firmamızın Bursa Merkez veya Ankara Bölge Müdürlüğü'nde istihdam edilecektir.</li>
<li>Adayların başvuru esnasında çalışmak istedikleri şehri belirtmeleri gerekmektedir.</li>
<li><u>Tercih belirtilmediği durumda aday açısından hangi şehir olduğu farketmez şeklinde yorumlanacaktır.</u></li>
</ul>
<br /><br />
<b><u>İş Geliştirme ve Satış Sorumlusu ‘nda aranan özellikler;</u></b>
@serhatsezer
serhatsezer / gist:e590fe642b171835c6866d5272a6e511
Created April 5, 2016 13:40
çift sayma problemi ios kodu
// track event category
id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
[tracker send:[[GAIDictionaryBuilder createEventWithCategory:category // Event category (required)
action:action // Event action (required)
label:label // Event label
value:nil] build]]; // Event value