Skip to content

Instantly share code, notes, and snippets.

View riteshhgupta's full-sized avatar

Ritesh Gupta riteshhgupta

View GitHub Profile
@riteshhgupta
riteshhgupta / README.md
Created April 21, 2023 06:21 — forked from IsaacXen/README.md
(Almost) Every WWDC videos download links for aria2c.
@riteshhgupta
riteshhgupta / Combine+WithLatestFrom.swift
Created November 29, 2019 11:30 — forked from freak4pc/Combine+WithLatestFrom.swift
withLatestFrom for Apple's Combine
//
// Combine+WithLatestFrom.swift
//
// Created by Shai Mishali on 29/08/2019.
// Copyright © 2019 Shai Mishali. All rights reserved.
//
import Combine
// MARK: - Operator methods
@riteshhgupta
riteshhgupta / BetterXcodeJumpToCounterpartSwift.org
Created November 17, 2019 05:03 — forked from danielmartin/BetterXcodeJumpToCounterpartSwift.org
Add support for a better Xcode's Jump to Next Counterpart in Swift

If you work on a Swift project that follows the Model-View-ViewModel (MVVM) architecture or similar, you may want to jump to counterpart in Xcode from your view to your model, and then to your view model. (ie. by using Ctrl+Cmd+Up and Ctrl+Cmd+Down).

You can do this in recent versions of Xcode by setting a configuration default.

From a terminal, just type this command and press Enter:

defaults write com.apple.dt.Xcode IDEAdditionalCounterpartSuffixes -array-add "ViewModel" "View"
@riteshhgupta
riteshhgupta / custom-ios-simulator-statusbar.sh
Created September 20, 2019 06:43 — forked from alexkaessner/custom-ios-simulator-statusbar.sh
customize iOS Simulator status bar (Xcode 11+)
$ xcrun simctl status_bar booted override --time "9:41" --batteryState charged --batteryLevel 100 --cellularMode active

Videos

import UIKit
class FeedViewController: UIViewController {
lazy var navigationBarController: NavigationBarController = {
NavigationBarController()
}()
override var navigationItem: UINavigationItem {
return navigationBarController.navigationItem
}
override func viewDidLoad() {
@riteshhgupta
riteshhgupta / SwiftElmFrameworkList.md
Created June 23, 2017 18:26 — forked from inamiy/SwiftElmFrameworkList.md
React & Elm inspired frameworks in Swift
@riteshhgupta
riteshhgupta / introrx.md
Created October 30, 2016 16:22 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@riteshhgupta
riteshhgupta / .gitignore
Created September 12, 2016 14:07
.gitignore file for swift projects!
# Created by https://www.gitignore.io/api/macos,xcode,swift,objective-c
### macOS ###
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon