Skip to content

Instantly share code, notes, and snippets.

View gugell's full-sized avatar

Ilia gugell

  • Genetec
  • Moldova, Chisinau
View GitHub Profile
#Thu Aug 01 22:59:15 EEST 2013
@gugell
gugell / задача-сайт-testhub.md
Created September 18, 2017 19:43 — forked from codedokode/задача-сайт-testhub.md
Сайт для тестирования TestHub

Задача

Примечание: раньше тут были другие условия задачи. Их можно найти в предыдущих ревизиях этого задания по ссылке https://gist.github.com/codedokode/8733007/e8e73b0255b3d899cb4e17dc9446fe694a8f5f7c

Cделать сайт TestHub, который позволяет создавать и проходить тесты. Их могут использовать например, преподаватели для проверки знаний студентов, работодатели для отсеивания кандидатов на вакансию, маркетологи для проведения опросов.

  • Предлагаемые технологии: фреймворк (Symfony 2 (сложнее, но интереснее) или Yii2), MySQL, шаблонизатор Twig, ORM Doctrine
  • Время выполнения: все зависит от тебя, но я бы смотрел на 4-6 недель
  • Уровень: продвинутый новичок
  • Требуемые знания: PHP, ООП, HTML/CSS, SQL, основы JS
@gugell
gugell / ObjectMapper operator for Realm.md
Created May 10, 2018 09:09 — forked from danilValeev/ObjectMapper operator for Realm.md
Easy mapping Realm's List and RealmOptional with ObjectMapper

This code helps using ObjectMapper with RealmSwift.

RealmSwift uses List<T> collection for "to many" relashionships and RealmOptional<T> for optional primitive types, but ObjectMapper can't map directly to List<T> and RealmOptional<T>.

With this operators you can properly define RealmSwift's relashionships and optional properties and use <- operator to map them.

Example

import Foundation

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
@gugell
gugell / file0.txt
Created October 20, 2018 14:41 — forked from syou007/file0.txt
[2017年版]RxSwift + Alamofire + ObjectMapper + RealmのSwift実装について ref: http://qiita.com/syou007/items/8f27e7f0d03b9cfcff6c
github "ReactiveX/RxSwift"
github "realm/realm-cocoa"
github "Alamofire/Alamofire" ~> 4.4
github "Alamofire/AlamofireImage" ~> 3.1
github "Hearst-DD/ObjectMapper" ~> 2.2
github "tristanhimmelman/AlamofireObjectMapper" ~> 4.0
@gugell
gugell / json.swift
Created October 22, 2018 10:06 — forked from chriseidhof/json.swift
Reflection
import Cocoa
struct Person {
var name: String = "John"
var age: Int = 50
var dutch: Bool = false
var address: Address? = Address(street: "Market St.")
}
struct Address {
@gugell
gugell / A.LICENSE.md
Created October 22, 2018 21:15 — forked from gonzalezreal/A.LICENSE.md
Using Realm with Value Types

Copyright 2017 Guillermo Gonzalez

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE U

import RxSwift
import Action
enum SceneStateOutput {
case idle
case sendingNoRecipient
case sendingSomeRecipients(sendingList: [String: String])
case sending
}
import UIKit
@IBDesignable
class UnderlinedTextField: UITextField {
@IBInspectable var borderColor: UIColor = Colors.darkText {
didSet { setNeedsDisplay() }
}
@IBInspectable var borderedWidth: CGFloat = 1 {
@gugell
gugell / ADVDataSource.h
Created December 4, 2018 11:05 — forked from advantis/ADVDataSource.h
Generic UITableView/UICollectionView data source for multiple sections
//
// Copyright © 2013 Yuri Kotov
//
#import <Foundation/Foundation.h>
typedef void(^ADVCellConfigurationBlock)(id cell, id object);
@interface ADVDataSource : NSObject <UITableViewDataSource, UICollectionViewDataSource>