Quote from Silicon Valley Source: http://siliconvalleyism.com/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias plistbuddy=/usr/libexec/PlistBuddy | |
alias codesign=/usr/bin/codesign | |
# | |
# Bundle identifier | |
# | |
set_plist_bundle_identifier() { | |
local bundle_identifier="$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT /v2.0/update-brokerage-deals-product/8455 HTTP/1.1 | |
Host: staging.agentdesks.com | |
Content-Type: application/json | |
Accept-Encoding: gzip, deflate, br | |
Cookie: <redact> | |
Connection: keep-alive | |
secure-id: 1b13e5eb1bd4e5284e8b8a1c155011d1 | |
Accept: application/json | |
User-Agent: ADUA(Apple|arm64|BROKERAGE|2.3.0|iOS|17.2|iPhone|3A09CED5-8D84-484C-B8D9-B4D4D995FB73) | |
Content-Length: 1155 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Combine | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view. | |
//let parent = Parent() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private func loadPoseSamples() { | |
var poseSamples: [PoseSample] = [] | |
var text: String | |
do { | |
if let path = Bundle.main.path(forResource: Self.POSE_SAMPLES_FILE, ofType: Self.POSE_SAMPLES_FILE_EXT) { | |
text = try String(contentsOfFile: path, encoding: String.Encoding.utf8) | |
} else { | |
print(TAG, "Could not find file.") | |
return | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"message" : "Success", | |
"success" : true, | |
"data" : { | |
"profile" : { | |
"first_name" : "Christopher", | |
"middle_name" : "https://randomuser.me/api/portraits/men/78.jpg", | |
"last_name" : "Shelton", | |
"profile_image" : "", | |
"city" : "Krakow", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ReusableView.swift | |
// Ranjithkumar Matheswaran | |
// | |
// Created by Ranjithkumar Matheswaran on 31/10/18. | |
// Copyright © 2018 AgentDesks LLC. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Registering for UITableView | |
myTableView.register(MyCustomTableViewCell.self) | |
myTableView.register(MyCustomHeaderFooterView.self) | |
/// Registering for UICollectionView | |
myCollectionView.register(MyCustomCollectionViewCell.self) | |
myCollectionView.register(MyCollectionViewReusableView.self) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// UITableViewCell | |
class MyCustomTableViewCell: UITableViewCell, ReusableView, NibLoadableView { | |
} | |
// Or More suggested way | |
extension MyCustomTableViewCell: ReusableView, NibLoadableView { } | |
/// UITableViewHeaderFooterView | |
class MyCustomHeaderFooterView: UITableViewHeaderFooterView, ReusableView, NibLoadableView { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Dequeue methods for UICollectionView | |
func dequeueReusableCell<T: UICollectionViewCell>(for indexPath: IndexPath) -> T where T: ReusableView { | |
guard let cell = dequeueReusableCell(withReuseIdentifier: T.defaultReuseIdentifier, for: indexPath) as? T else { | |
fatalError("Could not dequeue cell with identifier: \(T.defaultReuseIdentifier)") | |
} | |
return cell | |
} | |
func dequeueReusableSupplementaryView<T: UICollectionReusableView>(ofKind: String, indexPath: IndexPath) -> T where T: ReusableView { |
NewerOlder