Skip to content

Instantly share code, notes, and snippets.

View vialyx's full-sized avatar
🎯
Focusing

Maxim Vialyx vialyx

🎯
Focusing
View GitHub Profile
let type = EventType(rawValue: 0)
let unwrappedType: EventType = type!
let type: EventType! = EventType(rawValue: 0)
let unwrappedType: EventType = type
enum InstanceError: Error {
case parentNotFound
case notFullJSON
}
func createInstance(data: [String: Any]) throws {
guard let id = data["id"] as? String else {
throw InstanceError.notFullJSON
}
}
self.maxDistance = maxDistance
let min: CGFloat = 100
if self.maxDistance > min {
self.minDistance = min
} else {
self.minDistance = self.maxDistance
}
self.zoomDistanceSlider.minimumValue = Float(self.minDistance)
# Goto working folder
Maxim-Vialykh-MacBook-Pro:~ maxim.vialykh$ cd medium
# Clone repository
Maxim-Vialykh-MacBook-Pro:medium maxim.vialykh$ git clone https://gitlab.medium.com/medium/ios.git
# After this command you should enter username/password
Cloning into 'ios'...
remote: Counting objects: 8351, done.
remote: Compressing objects: 100% (2253/2253), done.
remote: Total 8351 (delta 6097), reused 8227 (delta 6020)
Receiving objects: 100% (8351/8351), 5.20 MiB | 17.03 MiB/s, done.
Maxim-Vialykh-MacBook-Pro:ios maxim.vialykh$ git pull
Already up-to-date.
# No changes
Maxim-Vialykh-MacBook-Pro:ios maxim.vialykh$ git checkout -b feature/new_story
Switched to a new branch 'feature/new_story'
# Now we on local branch 'feature/new_story'
Maxim-Vialykh-MacBook-Pro:ios maxim.vialykh$ git add *
# Add all new files to staging
Maxim-Vialykh-MacBook-Pro:ios maxim.vialykh$ git commit -m "Add Medium file"
[feature/new_story 75f3336] Add Medium file
1 file changed, 1 insertion(+)
create mode 100644 Medium
# All staged file committed locally
Maxim-Vialykh-MacBook-Pro:ios maxim.vialykh$ git push origin feature/new_story
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 281 bytes | 281.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote:
remote: To create a merge request for feature/new_story, visit:
remote: https://gitlab.medium.com/medium/ios/merge_requests/new?merge_request%5Bsource_branch%5D=feature%2Fnew_story
remote:
@vialyx
vialyx / merge.sh
Last active February 21, 2018 08:01
Maxim-Vialykh-MacBook-Pro:ios maxim.vialykh$ git merge develop
# After this command you should provide commit message - just start typing.
# To finish merge - enter ':exit enter' command
Merge made by the 'recursive' strategy.
Medium | 1 +
1 file changed, 1 insertion(+)
create mode 100644 Medium
# We have merged changes into current branch