Skip to content

Instantly share code, notes, and snippets.

🛴
It's all good, man!

Zaporozhchenko Alexander Maxatma

🛴
It's all good, man!
Block or report user

Report or block Maxatma

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
@Maxatma
Maxatma / DumbTest.playground
Created Jan 9, 2019
Swift switch enum problem
View DumbTest.playground
import UIKit
enum DumbTest {
case get(user: String)
case get(pony: String, tail: String)
func getSome() -> String {
switch self {
case .get(let user):
@Maxatma
Maxatma / .swift
Created Feb 12, 2018
Cannot convert return expression of type 'Date' to return type 'Date'
View .swift
class Date {
class func from(year: Int, month: Int , day: Int ) -> Date {
let gregorianCalendar = NSCalendar(calendarIdentifier: .gregorian)!
var dateComponents = DateComponents()
dateComponents.year = year
dateComponents.month = month
dateComponents.day = day
@Maxatma
Maxatma / custom thrift install
Last active Apr 10, 2018
Custom Apache Thrift installation guide
View custom thrift install
To install custom thrift ( like swift 3 from https://github.com/apocolipse/thrift),
u will need do all this things probably, otherwise just use
brew install thrift
1. Install homewbrew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2. Install all needed from this: http://thrift.apache.org/docs/install/
3. Be sure u installed bison, pkg-config, automake@1.15
4. do ./bootstrap.sh, if 'automake command not found' - check if u using needed version, if it linked. Try unlink and link again.
5. Check if all needed linked, if not do for example: brew link automake
6. If u got fatal error: 'openssl/err.h' file not found, do: ./configure LDFLAGS='-L/usr/local/opt/openssl/lib' CPPFLAGS='-I/usr/local/opt/openssl/include'
You can’t perform that action at this time.