Skip to content

Instantly share code, notes, and snippets.

View somedev's full-sized avatar
📲
#include "brain.h"

Eduard Panasiuk somedev

📲
#include "brain.h"
View GitHub Profile
@somedev
somedev / cycle.swift
Last active November 18, 2022 07:23
Retain cycle when using other class functions as closures for current class handlers
import Foundation
class Foo {
var bar:Bar? = nil
init() {
// this works as expected
//self.bar = Bar(handler: { [weak self] in self?.handlerFunction() } )
// this leads to retain cycle!
@somedev
somedev / .zshrc
Created February 17, 2020 09:38
My zsh config
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="afowler"
COMPLETION_WAITING_DOTS="true"
plugins=(git)
source $ZSH/oh-my-zsh.sh
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
@somedev
somedev / UIKonf.md
Last active May 18, 2017 07:00
My notes from UIKonf 2017

15 May 2017

Cate Huston - YOLO Releases Considered Harmful - Running An Effective Mobile Engineering Team

Maciej Piotrowski - Review All The Things!

swifting.io code review is like review music code review

  1. ego effect - do best at work. someone would review you
  2. good culture - finding defects in positive way (everyone makes mistakes and it's normal. don't blame each other)
#!/usr/bin/env ruby
# -*- coding: UTF-8 -*-
require 'csv'
hash = {}
CSV.foreach("test.csv", :headers => true, :header_converters => :symbol, :converters => :all) do |row|
if row.fields[0] && row.fields[1]
#!/usr/bin/python
# -*- coding: UTF-8 -*-
'''
Localization file generator
Created by Eduard Panasiuk 12.04.2016
'''
import csv
import sys
@somedev
somedev / crash.crashlog
Last active November 12, 2015 10:53
XCode 7.1.1 crash on login to dev account
Process: Xcode [60364]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 7.1.1 (9081)
Build Info: IDEFrameworks-9081000000000000~5
App Item ID: 497799835
App External ID: 814167395
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [60364]
import Foundation
extension FUIAlertView {
convenience init(title: String?,
message:String?,
delegate:FUIAlertViewDelegate?,
cancelButtonTitle:String?,
otherButtonTitles:String? ...) {