Skip to content

Instantly share code, notes, and snippets.

Victor Ilyukevich yas375

  • CareZone
  • Seattle, WA
Block or report user

Report or block yas375

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
@yas375
yas375 / justplay
Last active Jun 7, 2016
Annoyed by Xcode asking a name for each playground you create? Me too! Most often I use playgrounds I just want to try out something real quick.
View justplay
#!/bin/bash
set -e
TEMPLATE_NAME="Template.playground"
DESTINATION_PATH=`mktemp -d`/$TEMPLATE_NAME
cp -R "`dirname $0`/$TEMPLATE_NAME" $DESTINATION_PATH
open $DESTINATION_PATH
@yas375
yas375 / MBProgressHUD+Additions.h
Created May 11, 2016
Migrating from SVProgressHUD to MBProgressHUD. We needed to expose `hasFinished` from MBProgressHUD's implementation and have added tests to make sure we remember about it when we upgrade MBProgressHUD. We didn't use Swift's default values and instead have added multiple `showStatus...` because we need to use it from Objective-C.
View MBProgressHUD+Additions.h
//
// MBProgressHUD+Additions.h
// Caremobile
//
// Created by Victor Ilyukevich on 4/13/16.
// Copyright © 2016 Care Zone Inc. All rights reserved.
//
@interface MBProgressHUD (Additions)
- (BOOL)hasFinished;
View my.swift
func double(value: Int) -> Int {
print("double \(value)")
return value * 2
}
func triple(value: Int) -> Int {
print("triple \(value)")
return value * 3
}
View my.swift
func double(value: Int) -> Int {
print("double \(value)")
return value * 2
}
func triple(value: Int) -> Int {
print("triple \(value)")
return value * 3
}
@yas375
yas375 / expected_output
Last active May 10, 2016
Why `double` is called 5 times and `filter` is called 4 times? Shouldn't they be called same amount of times? Shouldn't they both be called only twice as I have 2-element array?
View expected_output
double 2
filter 4
double 8
filter 16
result: [4]
View keybase.md

Keybase proof

I hereby claim:

  • I am yas375 on github.
  • I am yas375 (https://keybase.io/yas375) on keybase.
  • I have a public key ASC-lX0XY5qQ26UPFzIPiEtZg7_PUBKtSstl9Zg2BUsL3go

To claim this, I am signing this object:

@yas375
yas375 / readme.md
Last active Apr 12, 2016
How to do rebase on a branch which has been force pushed
View readme.md

How to do rebase on a branch which has been force pushed

Looking into your branch:

98a21db Lorem (5 days ago)
3e3fc13 Ipsum
f73a5bb Dolor - This was the latest commit in parent branch when you've started a new one.
a25992b Sit - This is the first commit in your new branch.
42f6c06 Amet (1 hour ago)
@yas375
yas375 / process.sh
Last active Jan 21, 2016
Process `ffmpeg` on all mp4 files in current directory.
View process.sh
#!/bin/sh
mkdir -p processed
for file in *.mp4
do
ffmpeg -i $file -vcodec libx264 -crf 10 -x264opts colorprim=bt709:transfer=bt709:colormatrix=bt709:fullrange=off processed/$file
done
@yas375
yas375 / devices.txt
Created Jan 20, 2016
`ruby fix_names.rb > nice.csv`
View devices.txt
iPhone1,1 iPhone
iPhone1,2 iPhone 3G
iPhone2,1 iPhone 3GS
iPhone3,1 iPhone 4 (GSM)
iPhone3,3 iPhone 4 (CDMA)
iPhone4,1 iPhone 4S
iPhone5,1 iPhone 5 (A1428)
iPhone5,2 iPhone 5 (A1429)
iPhone5,3 iPhone 5c (A1456/A1532)
iPhone5,4 iPhone 5c (A1507/A1516/A1529)
View NibLoadable.swift
import UIKit
protocol NibLoadable: class {
typealias Object
static var nibName: String { get }
static var nib: UINib { get }
static var firstObjectFromNib: AnyObject? { get }
}
extension NibLoadable {
You can’t perform that action at this time.